From e78ed703060f5eb48956c3e52e77a41123d5efca Mon Sep 17 00:00:00 2001 From: Daniel Thompson-Yvetot Date: Mon, 15 Feb 2021 18:06:45 +0100 Subject: [PATCH] feat(package): proper naming Signed-off-by: Daniel Thompson-Yvetot --- README.md | 45 ++++++++++++++++++++++++++++++ examples/svelte-app/package.json | 2 +- examples/svelte-app/src/App.svelte | 2 +- package.json | 9 ++++-- 4 files changed, 53 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index e69de29b..c633d879 100644 --- a/README.md +++ b/README.md @@ -0,0 +1,45 @@ +# Tauri Plugin Stronghold + +This plugin provides a "classical" Tauri Plugin Interface to the [IOTA Stronghold](https://github.com/iotaledger/stronghold.rs) encrypted database, secure runtime, and peer-to-peer service. + +## Architecture +This repo 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 only distribution mechanism. + +## Installation +For more details and usage see [the svelte demo](examples/svelte-app/src/App.svelte). Please note, below in the dependencies you can also lock to a revision/tag in both the `Cargo.toml` and `package.json` + +### RUST +`src-tauri/Cargo.toml` +```yaml +[dependencies.tauri-stronghold] +git = "https://github.com/tauri-apps/tauri-plugin-stronghold.rs" +branch = "main" +``` + +Use in `src-tauri/src/main.rs`: +```rust +use tauri_stronghold::TauriStronghold; + +fn main() { + tauri::AppBuilder::new() + .plugin(TauriStronghold {}) + .build() + .run(); +} +``` + +### WEB +`package.json` +```json + "dependencies": { + "tauri-stronghold-plugin-api": "tauri-apps/tauri-plugin-stronghold.rs#main", +``` + +Import in your JS/TS: +``` +import { Stronghold, Location } from 'tauri-stronghold-plugin-api' +``` + + +# License +MIT / Apache-2.0 diff --git a/examples/svelte-app/package.json b/examples/svelte-app/package.json index f9652e0c..ae47f7d5 100644 --- a/examples/svelte-app/package.json +++ b/examples/svelte-app/package.json @@ -26,6 +26,6 @@ "dependencies": { "sirv-cli": "^1.0.0", "tauri": "^0.14.1", - "tauri-stronghold-api": "link:../../api-definitions/" + "tauri-stronghold-package-api": "link:../../" } } diff --git a/examples/svelte-app/src/App.svelte b/examples/svelte-app/src/App.svelte index e3ab9844..70af2331 100644 --- a/examples/svelte-app/src/App.svelte +++ b/examples/svelte-app/src/App.svelte @@ -1,5 +1,5 @@