From 5459cff1130d8f2e8b6e107344d1a0b72baef7ca Mon Sep 17 00:00:00 2001 From: mars Date: Tue, 25 Oct 2022 16:57:28 -0600 Subject: [PATCH] Rename test harness to sandbox in docs --- book/src/impl-rs/usage.md | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/book/src/impl-rs/usage.md b/book/src/impl-rs/usage.md index 0120d1b..464b545 100644 --- a/book/src/impl-rs/usage.md +++ b/book/src/impl-rs/usage.md @@ -9,22 +9,22 @@ Rust code, helper crates for Canary hosts, wrapper crates for scripts authored in Rust, and even the source code for the documentation that you're currently reading. -`canary-rs` provides a graphical "test harness" that embeds the Canary runtime +`canary-rs` provides a graphical "sandbox" that embeds the Canary runtime into a lightweight graphical app. It has two purposes: first, to give script authors a playground independent of a larger framework to safely debug, benchmark, and experiment with their scripts, and second, to give Canary embedders a live, functioning example of how Canary can be integrated into their applications. -# Running the `canary-rs` test harness +# Running the `canary-rs` sandbox -The test harness requires a Canary script to run. If you don't already have one, +The sandbox requires a Canary script to run. If you don't already have one, you can follow [these instructions](optional-building-the-sword-art-online-demonstration-ui-script) to build the example script provided by `canary-rs`. -## Building the test harness +## Building the sandbox -To build the test harness from source, first make sure that you have +To build the sandbox from source, first make sure that you have [installed the standard Rust toolchain](https://www.rustlang.org/tools/install), including `rustup`, `rustc`, and `cargo`, as well as a frontend to [Git](https://git-scm.com/). This guide assumes that you are using the Git @@ -36,23 +36,23 @@ $ git clone https://git.tebibyte.media/canary/canary-rs.git $ cd canary-rs ``` -Then, run `cargo` to build the test harness package: +Then, run `cargo` to build the sandbox package: ```sh -$ cargo build --release -p canary_egui_harness +$ cargo build --release -p canary_sandbox ``` -Now, the test harness can be ran with a script: +Now, the sandbox can be ran with a script: ```sh -$ cargo run --release -p canary_egui_harness -- +$ cargo run --release -p canary_sandbox -- ``` ## (Optional) Building the Sword Art Online demonstration UI script `canary-rs` provides an example of a fully-functioning script which, optionally, -can be built and loaded into the test harness to ensure its functioning. +can be built and loaded into the sandbox to ensure its functioning. To build it, you must first follow [the instructions above](#building-the-test-harness) -to clone and build the test harness and to set up the Rust toolchain. +to clone and build the sandbox and to set up the Rust toolchain. Then, add the `wasm32-unknown-unknown` target so that Rust can compile to WebAssembly: @@ -66,9 +66,9 @@ $ cargo build --release -p sao-ui-rs --target wasm32-unknown-unknown ``` The path to the built example script is `target/wasm32-unknown-unknown/release/sao_ui_rs.wasm`. -Now it can be run using the test harness: +Now it can be run using the sandbox: ```sh -$ cargo run --release -p canary_egui_harness -- target/wasm32-unknown-unknown/release/sao_ui_rs.wasm +$ cargo run --release -p canary_sandbox -- target/wasm32-unknown-unknown/release/sao_ui_rs.wasm ``` # Using `canary-rs` as a Rust library