@@ -34,6 +34,7 @@ $ curl -H "Content-Type: text/plain" --data-binary @test_file.txt http://localho
3434```
3535
3636## Quick Start
37+
3738The project uses [ ` Wasmtime ` ] [ wasmtime ] as its runtime. However, if needed, it
3839can easily be adjusted to use [ ` jco ` ] [ jco ] instead. For ` wasmtime ` installation,
3940simply run:
@@ -42,18 +43,29 @@ simply run:
4243$ curl https://wasmtime.dev/install.sh -sSf | bash
4344```
4445
45- The quickest way to start is by using [ ` just ` ] [ just ] .
46+ To build and serve the wasm component on ` localhost:8080 ` :
47+
4648``` bash
47- $ just serve # to build and serve the wasm component on `localhost:8080`
48- $ curl localhost:8080 # to send requests to component.
49+ $ npm install
50+ $ npm run serve
4951```
5052
51- Alternatively, run :
53+ Then send requests to the component :
5254
5355``` bash
54- $ npm install
55- $ npm run build
56- $ wasmtime serve -S common dist/sample-wasi-http-js.wasm
56+ $ curl localhost:8080
57+ ```
58+
59+ ## Development
60+
61+ ``` bash
62+ $ npm run build # Build the wasm component
63+ $ npm test # Run tests
64+ $ npm run fmt # Format code
65+ $ npm run fmt:check # Check formatting
66+ $ npm run lint # Lint code
67+ $ npm run fetch-wit # Fetch WIT dependencies
68+ $ npm run update-wit # Update WIT lock file
5769```
5870
5971## See Also
@@ -65,7 +77,6 @@ $ wasmtime serve -S common dist/sample-wasi-http-js.wasm
6577Apache-2.0 with LLVM Exception
6678
6779[ jco ] : https://github.com/bytecodealliance/jco
68- [ just ] : https://github.com/casey/just
6980[ rust-sample ] : https://github.com/bytecodealliance/sample-wasi-http-rust
7081[ wasi-http ] : https://github.com/WebAssembly/wasi-http
7182[ wasmtime ] : https://wasmtime.dev/
0 commit comments