Using Rust 1.11 and Cargo 1.12 (nightly), I'm trying to create a [workspace]
which contains a few libraries and a few executables.
In my root folder, I added my sub-crates with:
cargo new loader
cargo new shell --bin
I then added the cargo.toml
shown below to my root folder.
[package]
name = "rustenv"
version = "0.1.0"
authors = ["ME"]
[workspace]
members = [
"loader"
, "shell"
]
Running cargo build
in my root folder yields:
PS E:\r\rustenv> cargo build error: failed to parse manifest at `E:\r\rustenv\Cargo.toml` Caused by: no targets specified in the manifest either src/lib.rs, src/main.rs, a [lib] section, or [[bin]] section must be present
I am a bit confused about how this [workspace]
feature is supposed to work given that I am a Visual Studio user by nature and there, I can simply add projects to a workspace. It appears there is something else I have to do with Cargo to get the same effect.