Skip to content

Commit 15df525

Browse files
authored
docs: fix the examples directory in EXAMPLE.md and .gitignore (#195)
1 parent d3c6239 commit 15df525

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ target/
66
/crates/wasmtime-test
77
/test.js
88
/shared
9-
example/package-lock.json
10-
example/hello.component.wasm
9+
examples/hello-world/guest/package-lock.json
10+
examples/hello-world/guest/hello.component.wasm
1111
/build-debug
1212
/build-release
1313
/build-release-weval

EXAMPLE.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@ node componentize.mjs
4444

4545
### Running the Component in Wasmtime
4646

47-
Set up the [Cargo.toml as in the example directory](example/Cargo.toml).
47+
Set up the [Cargo.toml as in the example directory](examples/hello-world/host/Cargo.toml).
4848

49-
Set up [`src/main.rs`](example/src/main.rs) as in the example directory.
49+
Set up [`src/main.rs`](examples/hello-world/host/src/main.rs) as in the example directory.
5050

5151
Building and running the binary should print the result:
5252

-10.2 MB
Binary file not shown.

examples/hello-world/test.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ export TEST_BINARY_PATH=$(realpath host)/target/release/wasmtime-test
77
# Build the JS component if not present
88
echo -e "[info] expecting component WASM at [$COMPONENT_WASM_PATH]...";
99
if [ ! -f "$COMPONENT_WASM_PATH" ]; then
10-
cd guest && npm install && npm build
10+
cd guest && npm install && npm run build && cd ..
1111
fi
1212

1313
# Build the Rust embedding test binary if not present
14-
echo -e "[info] expecting test binary at [$COMPONENT_WASM_PATH]...";
14+
echo -e "[info] expecting test binary at [$TEST_BINARY_PATH]...";
1515
if [ ! -f "$TEST_BINARY_PATH" ]; then
16-
cd host && cargo build --release
16+
cd host && cargo build --release && cd ..
1717
fi
1818

1919
# Run the test binary, capturing the output

0 commit comments

Comments
 (0)