This plugin provides a "classical" Tauri Plugin Interface to the IOTA Stronghold encrypted database, secure runtime, and peer-to-peer service.
This plugin is currently written to comply with the pre-beta version of Tauri. It will change when the beta release candidate is published and is currently instable.
This repo shape might appear to be strange, but it is really just a hybrid Rust / Typescript project that recommends a specific type of consumption, namely using GIT as the secure distribution mechanism, and referencing specific unforgeable git hashes. Of course, it can also be consumed via Cargo and NPM.
Rust source code that contains the plugin definition and Stronghold features.
Typescript source for the /dist folder that provides an API to interface with the rust code.
Tree-shakeable transpiled JS to be consumed in a WRY webview.
Forthcoming tauri bindings to other programming languages, like DENO.
There are three general methods of installation that we can recommend.
- Pull sources directly from Github using git tags / revision hashes (most secure, good for developement, shown below)
- Git submodule install this repo in your tauri project and then use
file
protocol to ingest the source - Use crates.io and npm (easiest, and requires you to trust that our publishing pipeline worked)
For more details and usage see the svelte demo. Please note, below in the dependencies you can also lock to a revision/tag in both the Cargo.toml
and package.json
src-tauri/Cargo.toml
[dependencies.tauri-plugin-stronghold]
git = "https://github.com/tauri-apps/tauri-plugin-stronghold"
tag = "v0.1.0"
#branch = "main"
Use in src-tauri/src/main.rs
:
use tauri_plugin_stronghold::TauriStronghold;
fn main() {
tauri::AppBuilder::new()
.plugin(TauriStronghold {})
.build()
.run();
}
Install
npm install github:tauri-apps/tauri-plugin-stronghold#v0.1.0
# or
yarn add github:tauri-apps/tauri-plugin-stronghold#v0.1.0
package.json
"dependencies": {
"tauri-plugin-stronghold-api": "tauri-apps/tauri-plugin-stronghold#v0.1.0",
Use within your JS/TS:
import { Stronghold, Location } from 'tauri-plugin-stronghold-api'
MIT / Apache-2.0