[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 1/7] build-system: Add cargo build system.
From: |
David Craven |
Subject: |
Re: [PATCH 1/7] build-system: Add cargo build system. |
Date: |
Fri, 30 Sep 2016 12:49:13 +0200 |
> Is this correct? What happens when test-target is not specified? I see
> below that the target is hard-coded to “test”. Maybe set it to “test”
> here and use it on the build side?
> Shouldn’t this respect “test-target”?
There is no other build target than test. Functions that are tests
have an attribute #[cfg(test)] above them. Running cargo test tells
cargo to run all functions that are annotated like that.
> I’m not familiar with Rust so I don’t know what crates are. Are they
> actually source files? Are they archives?
A crate is a tar.gz file which contains the source.
> You write that we are replacing references in Cargo.toml with store
> paths but I see no evidence of this. Could you please clarify?
These patches only build packages without dependencies. I have
packages importing/building with a simple dependency structure.
I'm refactoring the importer to allow recursive imports, and then I'll
try to package cargo with it.
> Why only use “cargo install” in case there are executables? Can we
> detect this by looking at some description file of the package? It
> doesn’t seem right to unconditionally end on #t.
So we installed the source. At this point the build system can use it. The
only time we install binaries is when the crate contains an executable or
a script. In those cases `cargo install` should work. If there isn't an
executable we don't care if it fails.
> I don’t understand this. Does this mean that currently dependencies are
> always bundled?
No. This is to prevent cargo from fetching the missing dependencies from
crates.io and to use our crates. Rust/LLVM performs aggressive optimization,
executables include all their rust symbols. You can write a C
compatible library,
but most crates are meant for Rust development. They have their own binary
format called *.rlib that is like an *.a file. The main focus for now
is building
cargo. The situation should improve, but this is how other distros are packaging
crates currently.
- [PATCH 3/7] import: crate: Add crate updater., (continued)
- [PATCH 3/7] import: crate: Add crate updater., David Craven, 2016/09/28
- [PATCH 7/7] gnu: Add rust-libc., David Craven, 2016/09/28
- [PATCH 4/7] upstream: Use a the first url from urls when find2 returns #f., David Craven, 2016/09/28
- [PATCH 6/7] gnu: Add cargo-bootstrap., David Craven, 2016/09/28
- [PATCH 2/7] import: Add importer for rust crates., David Craven, 2016/09/28
- [PATCH 5/7] gnu: Add rustc-bootstrap., David Craven, 2016/09/28
- Re: [PATCH 1/7] build-system: Add cargo build system., Ricardo Wurmus, 2016/09/30
- Re: [PATCH 1/7] build-system: Add cargo build system.,
David Craven <=