mirror of
https://github.com/nix-community/naersk
synced 2024-11-22 19:53:05 +00:00
Add comparison to rustPlatform and carnix
This commit is contained in:
parent
5834403f4f
commit
0f5ed0edbf
1 changed files with 18 additions and 0 deletions
18
README.md
18
README.md
|
@ -22,6 +22,24 @@ in naersk.buildPackage ./path/to/rust {}
|
|||
|
||||
_NOTE_: `./path/to/rust/` should contain a `Cargo.lock`.
|
||||
|
||||
## Comparison
|
||||
|
||||
There are two other notable Rust frameworks in Nix: `rustPlatform` and
|
||||
`carnix`.
|
||||
|
||||
`naersk` uses `cargo` directly, as opposed to `carnix` which emulates `cargo`'s
|
||||
build logic. Moreover `naersk` sources build information directly from the
|
||||
project's `Cargo.lock` which makes any code generation unnecessary.
|
||||
|
||||
For the same reason, `naersk` does not need anything like `rustPlatform`'s
|
||||
`cargoSha256`. All crates are downloaded using the `sha256` checksums provided
|
||||
in the project's `Cargo.lock`. Because `cargo` doesn't register checksums for
|
||||
`git` dependencies, `naersk` does not support `git` dependencies.
|
||||
|
||||
Finally `naersk` supports incremental builds by first performing a
|
||||
dependency-only build, and _then_ a build that depends on the top-level crate's
|
||||
code and configuration.
|
||||
|
||||
|
||||
[cargo]: https://crates.io/
|
||||
[niv]: https://github.com/nmattia/niv
|
||||
|
|
Loading…
Reference in a new issue