|
|
|
@ -66,20 +66,14 @@ import("../crate/pkg").then(module => { |
|
|
|
|
|
|
|
|
|
## Run The Project |
|
|
|
|
|
|
|
|
|
To generate our Rust-compiled to wasm code, in the `crate` directory we run: |
|
|
|
|
```bash |
|
|
|
|
wasm-pack build |
|
|
|
|
``` |
|
|
|
|
You can see this generated code in the `pkg` directory that's just been created. |
|
|
|
|
|
|
|
|
|
In the `crate` directory, we will also run: |
|
|
|
|
To generate our Rust-compiled to wasm code, in the root directory we run: |
|
|
|
|
```bash |
|
|
|
|
npm run build |
|
|
|
|
``` |
|
|
|
|
This will create our bundled JavaScript module in a new directory `dist`. |
|
|
|
|
|
|
|
|
|
We should be ready to run our project now! |
|
|
|
|
In the `dist` directory, we'll run: |
|
|
|
|
In the root directory, we'll run: |
|
|
|
|
|
|
|
|
|
```bash |
|
|
|
|
npm start |
|
|
|
|