sim: Move Cargo package to top level
Instead of having to cd into the 'sim' directory, create a top-level Cargo.toml file that adds the sim as a workspace. For the most part, this doesn't change how the simulator works. It is still possible to run `cargo test ...` within the `sim` directory. However, the `target` directory will reside at the top-level of the tree instead of within the sim directory. One change is that running cargo commands at the top of the tree will run those commands on all of the packages found within the tree. Specific packages can be tested by either changing to the directory of that package, or passing `-p <dir>` to the cargo test command (i.e. `cargo test -p bootsim`). The other visible change from this commit is that the 'target' directory will always be at the top of the tree, rather than in particular directory where the test is run. Any scripts or tools that expect this to be in a certainly location, will have to be modified. Signed-off-by: David Brown <david.brown@linaro.org>
This commit is contained in:
parent
7f8c0a2c4e
commit
6d56cd8a5f
|
@ -25,3 +25,6 @@ rusty-tags.*
|
||||||
# Python egg metadata, regenerated from source files by setuptools.
|
# Python egg metadata, regenerated from source files by setuptools.
|
||||||
/scripts/*.egg-info
|
/scripts/*.egg-info
|
||||||
/scripts/*.egg
|
/scripts/*.egg
|
||||||
|
|
||||||
|
# The target directory from Rust development
|
||||||
|
/target/
|
||||||
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
[workspace]
|
||||||
|
members = ["sim"]
|
||||||
|
exclude = ["ptest"]
|
||||||
|
|
||||||
|
# The simulator runs very slowly without optimization. A value of 1
|
||||||
|
# compiles in about half the time, but runs about 5-6 times slower. 2
|
||||||
|
# and 3 are hardly different in either compile time or performance.
|
||||||
|
# Use 2 in case that makes the code slightly more debuggable.
|
||||||
|
[profile.test]
|
||||||
|
opt-level = 2
|
||||||
|
|
||||||
|
[profile.dev]
|
||||||
|
opt-level = 2
|
|
@ -49,13 +49,3 @@ cipher = "0.3"
|
||||||
aes = { version = "0.7.4", features = ["ctr"] }
|
aes = { version = "0.7.4", features = ["ctr"] }
|
||||||
base64 = "0.13.0"
|
base64 = "0.13.0"
|
||||||
typenum = "1.13.0"
|
typenum = "1.13.0"
|
||||||
|
|
||||||
# The simulator runs very slowly without optimization. A value of 1
|
|
||||||
# compiles in about half the time, but runs about 5-6 times slower. 2
|
|
||||||
# and 3 are hardly different in either compile time or performance.
|
|
||||||
# Use 2 in case that makes the code slightly more debuggable.
|
|
||||||
[profile.test]
|
|
||||||
opt-level = 2
|
|
||||||
|
|
||||||
[profile.dev]
|
|
||||||
opt-level = 2
|
|
||||||
|
|
Loading…
Reference in New Issue