diff --git a/quick-start/2.-hosted-services.md b/quick-start/2.-hosted-services.md index bb94fa9..60be6cf 100644 --- a/quick-start/2.-hosted-services.md +++ b/quick-start/2.-hosted-services.md @@ -73,6 +73,12 @@ mod tests { To run our tests, we can use the familiar[`cargo test`](https://doc.rust-lang.org/cargo/commands/cargo-test.html) . However, we don't really care all that much about our native Rust functions being tested but want to test our WebAssembly functions. This is where the extra code in the test module comes into play. In short., we are running `cargo test` against the exposed interfaces of the `hello_world.wasm` module and in order to do that, we need the `marine_test` macro and provide it with both the modules directory, i.e., the `artifacts` directory, and the location of the `Config.toml` file. Note that the `Config.toml` file specifies the module metadata and optional module linking data. Moreover, we need to call our Wasm functions from the module namespace, i.e. `hello_world.hello` instead of the standard `hello` -- see lines 13 and 19 above, which we specify as an argument in the test function signature \(lines 11 and 17, respectively\). +{% hint style="info" %} +In order to able able to use the macro, install the [`marine-rs-sdk-test`](https://crates.io/crates/marine-rs-sdk-test) crate as a dev dependency: + +`[dev-dependencies] marine-rs-sdk-test = "`<version>`"` +{% endhint %} + From the VSCode terminal, we now run our tests with the`cargo +nightly test --release` command. Please note that if `nightly` is your default, you don't need it in your `cargo test` command. ![Cargo test using Wasm module](../.gitbook/assets/image%20%2833%29.png) @@ -86,16 +92,14 @@ mrepl configs/Config.toml which puts us in the REPL: ```bash -Welcome to the Marine REPL (version 0.8.0) +mrepl configs/Config.toml +Welcome to the Marine REPL (version 0.9.1) Minimal supported versions sdk: 0.6.0 interface-types: 0.20.0 -New version is available! 0.8.0 -> 0.9.0 -To update run: cargo +nightly install mrepl --force - -app service was created with service id = 72531b56-8856-4d91-8ff3-f2e55f4717c4 -elapsed time 80.6251ms +app service was created with service id = 8a2d946d-b474-468c-8c56-9e970ee64743 +elapsed time 53.593404ms 1> i Loaded modules interface: diff --git a/quick-start/README.md b/quick-start/README.md index c65ab77..56e3201 100644 --- a/quick-start/README.md +++ b/quick-start/README.md @@ -12,7 +12,7 @@ For your development convenience, Fluence provides a [docker-based development e Fluence's devcontainer is a ready to use dockerized development environment with VSCode integration containing the following tools: -* [`aqua-cli`](https://www.npmjs.com/package/@fluencelabs/aqua-cli) to compile [Aqua](https://doc.fluence.dev/aqua-book/) to AIR or wrapped in Typescript +* [`aqua`](https://www.npmjs.com/package/@fluencelabs/aqua-cli) to compile [Aqua](https://doc.fluence.dev/aqua-book/) to AIR or wrapped in Typescript * [`fldist`](https://www.npmjs.com/package/@fluencelabs/fldist) to manage services and optionally execute compiled Aqua from the command line * [`marine`](https://crates.io/crates/marine) to compile services developed in Rust to the wasm32-wasi target * [`mrepl`](https://crates.io/crates/mrepl) to run, test and debug WebAssembly \(Wasm\) services locally