summaryrefslogtreecommitdiff
path: root/src/rust/cargo/README.md
diff options
context:
space:
mode:
authorKlaus Aehlig <klaus.aehlig@huawei.com>2024-06-27 17:30:33 +0200
committerGitHub <noreply@github.com>2024-06-27 17:30:33 +0200
commitf46b8e21e0013eeb04a2944dc85be327a896ffe7 (patch)
tree8997065bb29dcdd09fbe8f131680f2377c063e70 /src/rust/cargo/README.md
parent05b2d6fc51146fe07340a58bc87fbbd99e788143 (diff)
parent3c54e850a32e4250c36bee3f118df977c3e8773d (diff)
downloadhello-nix-f46b8e21e0013eeb04a2944dc85be327a896ffe7.tar.gz
Merge pull request #4 from aehlig/simplify-cargo-import
Simplify cargo import
Diffstat (limited to 'src/rust/cargo/README.md')
-rw-r--r--src/rust/cargo/README.md15
1 files changed, 5 insertions, 10 deletions
diff --git a/src/rust/cargo/README.md b/src/rust/cargo/README.md
index 5ac8e27..4e6d59a 100644
--- a/src/rust/cargo/README.md
+++ b/src/rust/cargo/README.md
@@ -19,12 +19,8 @@ on standard input and returns one on standard output. It needs to know
- the root of the pyhsical repository, and
- the location of the crate directory, relative to the root of the physical
repository.
- - the name of the already imported `rules-rust` repository.
-
-While the tool in general can also import `rules-rust` itself, we need to import
-the rules manually first, as we have to provide our own target root for the
-defaults. Future versions of the rules might bring a defaults target suitable
-for our use case, but so far this is not the case.
+ - the name of the already imported `rules-rust` repository, if desired
+ (otherwise it will default to the upstream rust rules).
The name of the imported main repository is the crate name (without version),
as specified in the `Cargo.toml` file. Some care should be taken that is does
@@ -36,10 +32,9 @@ As opposed to other import tools, however, `just-import-cargo` also creates
files in the pysical repository. Those are the following.
- In the crate the file `Cargo.lock` generated by the call to cargo, as
well as a target file,
- - The file `etc/defaults/rust/TARGETS` relative to in the top-level of the
- physical repository (with a content independent of the respective crate).
- This file is the reason that our `rules-rust/nix` use `nix.TARGETS` as
- target-file name.
+ - The file `etc/defaults/rust/TARGETS.cargo_import` relative to
+ in the top-level of the physical repository (with a content
+ independent of the respective crate).
- In the directory `etc/deps-rust` target files for all the imported crates.
As their name encode crate name and version, calling `just-import-cargo`
for several crates should not cause a conflict here.