My project consists of two components. The directory tree looks like this:
. ├── Cargo.lock ├── Cargo.toml ├── client │ ├── Cargo.toml │ └── src │ └── main.rs └── server ├── Cargo.toml └── src └── main.rs
Cargo.toml is simply a workspace:
[workspace] members = [ "server", "client" ]`
client is an stdweb project, which needs to be built using the Cargo subcommand
cargo web build.
server is compiled as usual, using
What is the best way to set this up? I want the whole workspace to build correctly when I simply issue a top-level
cargo build command.
Do I need to write a
build.rs script for the client, or is there an easier way to accomplish this, since I’m still compiling Rust code?