Skip to content

Commit

Permalink
Add troubleshooting section to build delta-Q web app
Browse files Browse the repository at this point in the history
  • Loading branch information
abailly committed Sep 30, 2024
1 parent 6f51d47 commit 42708a0
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion delta_q/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,27 @@ The build comprises two steps:
- `trunk build` (i.e. you’ll need to `cargo install --locked trunk` first)
- `cargo run --bin editor`

The first one builds the web app in the `dist/` folder, which the second one then integrates into the single-binary application that will serve HTTP resources on port 8080 when run.
The first one uses [trunk](https://trunkrs.dev) to build the web app in the `dist/` folder, which the second one then integrates into the single-binary application that will serve HTTP resources on port 8080 when run.

When developing the web UI part you can leave `cargo run --bin editor` running while using `trunk serve` to serve the UI with change detection.
Requests to the `delta_q/*` endpoints will be proxied.

### Troubleshooting

Depending on local Rust configuration, building the web app might be less straightforward.

Trunk needs the Wasm bindings generators but they are not installed by default at least on MacOS M1:

```
cargo install --locked wasm-bindgen-cli
```

It also needs a Wasm toolchain:

```
rustup target add wasm32-unknown-unknown
```

## Known Shortcomings

- not optimised at all, especially regarding memory usage (need to make cloning cheap for CDF, DeltaQ, etc.) and web assembly size
Expand Down

0 comments on commit 42708a0

Please sign in to comment.