mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
rust: Create workspace
A workspaces simplifies the build and packaging process significantly. All build artifacts and binaries are now built in a single location (e.g., rust/target/release/*), and a unified dependency resolution is used. Hence one Cargo.lock for all crates at rust/Cargo.lock. Closes: https://github.com/ibm-s390-linux/s390-tools/issues/156 Reviewed-by: Marc Hartmayer <marc@linux.ibm.com> Signed-off-by: Steffen Eiden <seiden@linux.ibm.com>
This commit is contained in:
+18
-2
@@ -81,11 +81,27 @@ is a start, but can change over time.
|
||||
Dependencies used by the crates listed above can be used, too.
|
||||
|
||||
### Add new tool
|
||||
To add a new tool issue `cargo new <TOOLNAME>` in the `rust` directory.
|
||||
To add a new tool issue `cargo new $TOOLNAME` in the `rust` directory.
|
||||
|
||||
Add the tool to the _s390-tools_ build system:
|
||||
```Makefile
|
||||
CARGO_TARGETS := TOOLNAME
|
||||
CARGO_TARGETS := $TOOLNAME
|
||||
```
|
||||
Add the library to the _s390-tools_ test list:
|
||||
```Makefile
|
||||
CARGO_TEST_TARGETS := $LIBNAME
|
||||
```
|
||||
|
||||
Add the tool/library to the cargo workspace:
|
||||
```toml
|
||||
[workspace]
|
||||
members = [
|
||||
"pv",
|
||||
"pvsecret",
|
||||
"$TOOLNAME",
|
||||
"$LIBNAME"
|
||||
"utils",
|
||||
]
|
||||
```
|
||||
|
||||
### Versions
|
||||
|
||||
Reference in New Issue
Block a user