This commit is contained in:
boneyard93501 2021-09-04 18:02:26 -05:00
commit ad5dd43694
6 changed files with 13 additions and 13 deletions

View File

@ -9,9 +9,9 @@ name = "ethqlite"
path = "src/main.rs" path = "src/main.rs"
[dependencies] [dependencies]
marine-rs-sdk = { version="0.6.10", features = ["logger"]} marine-rs-sdk = { version = "0.6.11", features = ["logger"] }
log = "0.4.8" log = "0.4.8"
marine-sqlite-connector = "0.5.0" marine-sqlite-connector = "0.5.1"
serde = { version = "1.0.118", features = ["derive"] } serde = { version = "1.0.118", features = ["derive"] }
serde_json = "1.0.64" serde_json = "1.0.64"
once_cell = "1.4.1" once_cell = "1.4.1"

View File

@ -7,5 +7,5 @@ marine build --release
rm -f artifacts/*.wasm rm -f artifacts/*.wasm
cp target/wasm32-wasi/release/ethqlite.wasm artifacts/ cp target/wasm32-wasi/release/ethqlite.wasm artifacts/
wget https://github.com/fluencelabs/sqlite/releases/download/v0.14.0_w/sqlite3.wasm wget https://github.com/fluencelabs/sqlite/releases/download/v0.15.0_w/sqlite3.wasm
mv sqlite3.wasm artifacts/ mv sqlite3.wasm artifacts/

View File

@ -14,10 +14,10 @@ path = "src/main.rs"
[dependencies] [dependencies]
serde = { version = "1.0.118", features = ["derive"] } serde = { version = "1.0.118", features = ["derive"] }
serde_json = "1.0.64" serde_json = "1.0.64"
marine-rs-sdk = { version = "=0.6.10", features = ["logger"]} marine-rs-sdk = { version = "=0.6.11", features = ["logger"] }
log = "0.4.8" log = "0.4.8"
chrono = "0.4.19" chrono = "0.4.19"
ethereum-types = "0.11.0" ethereum-types = "0.11.0"
hex = "0.4.3" hex = "0.4.3"
tiny-keccak = { version = "2.0.2", features = ["keccak", "sha3"] } tiny-keccak = { version = "2.0.2", features = ["keccak", "sha3"] }
marine-sqlite-connector = "0.5.0" marine-sqlite-connector = "0.5.1"

View File

@ -198,7 +198,7 @@ You can build, inspect and test the project as outlined in the [Greeting Example
## SQLite Example ## SQLite Example
[SQLite](https://www.sqlite.org/index.html) is an ubiquitous persistence solution also available on the Fluence stack. Unlike basic compute modules, creating an SQLite service is a little more intricate. In order to create the service, we need two dependencies: An SQLite Wasm module and an SQLite adapter, where the adapter is a [WASM IT compliant](https://crates.io/crates/marine-sqlite-connector) [sqlite](https://github.com/stainless-steel/sqlite) package implementation. The SQLite Wasm module can be obtain from the repo as a [release](https://github.com/fluencelabs/sqlite/releases/tag/v0.14.0_w) or compiled from [code](https://github.com/fluencelabs/sqlite). For the purpose of this example, we use the release version -- see `build.sh`. [SQLite](https://www.sqlite.org/index.html) is an ubiquitous persistence solution also available on the Fluence stack. Unlike basic compute modules, creating an SQLite service is a little more intricate. In order to create the service, we need two dependencies: An SQLite Wasm module and an SQLite adapter, where the adapter is a [WASM IT compliant](https://crates.io/crates/marine-sqlite-connector) [sqlite](https://github.com/stainless-steel/sqlite) package implementation. The SQLite Wasm module can be obtain from the repo as a [release](https://github.com/fluencelabs/sqlite/releases/tag/v0.15.0_w) or compiled from [code](https://github.com/fluencelabs/sqlite). For the purpose of this example, we use the release version -- see `build.sh`.
As a result, our service is comprised of two modules: the SQLite Wasm module and our sqlite module. The Rust code, see `src/main.rs` is pretty standard fare but our config file changes signficiantly: As a result, our service is comprised of two modules: the SQLite Wasm module and our sqlite module. The Rust code, see `src/main.rs` is pretty standard fare but our config file changes signficiantly:

View File

@ -10,8 +10,8 @@ name = "sqlite_test"
path = "src/main.rs" path = "src/main.rs"
[dependencies] [dependencies]
marine-rs-sdk = "0.6.10" marine-rs-sdk = "0.6.11"
marine-sqlite-connector = "0.5.0" marine-sqlite-connector = "0.5.1"
[dev-dependencies] [dev-dependencies]
marine-rs-sdk-test = "0.2.0" marine-rs-sdk-test = "0.2.0"

View File

@ -8,5 +8,5 @@ marine build --release
mkdir -p artifacts mkdir -p artifacts
rm -f artifacts/*.wasm rm -f artifacts/*.wasm
cp target/wasm32-wasi/release/sqlite_test.wasm artifacts/ cp target/wasm32-wasi/release/sqlite_test.wasm artifacts/
wget https://github.com/fluencelabs/sqlite/releases/download/v0.14.0_w/sqlite3.wasm wget https://github.com/fluencelabs/sqlite/releases/download/v0.15.0_w/sqlite3.wasm
mv sqlite3.wasm artifacts/ mv sqlite3.wasm artifacts/