[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: how does antioxidant work?
From: |
Maxime Devos |
Subject: |
Re: how does antioxidant work? |
Date: |
Thu, 8 Sep 2022 12:03:36 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.12.0 |
On 08-09-2022 03:17, jgart wrote:
Hi Maxime,
how does antioxidant build system for rust work at a high level?
https://notabug.org/maximed/cargoless-rust-experiments
all best,
There are two parts:
- The actual build system (antioxidant.scm) -- it reads the
Cargo.toml to see what the dependencies are, looks for the
(compiled!) dependencies in the 'inputs' and 'native-inputs',
runs build.rs, compiles it (with 'rustc') and install the
compiled result (sources aren't installed). It also runs tests.
- The cargo -> antioxidant transformation code. The
procedure vitaminate/auto* takes a package, and rewrites it to
fit with antioxidant -- one of these is moving #:cargo-inputs
into 'inputs', and (recursively) rewriting these inputs.
Sometimes phases need to be adjusted, sometimes for cargo there
was #:skip-build? but antioxidant doesn't do that, and it runs
tests, so it sometimes turns out tests need to be disabled.
(This will have to later be changed to _source code_
transformations, maybe with "guix style", to integrate things
into Guix proper)
There are also some other small things with some checks for
vendoring, #:test-options
Greetings,
Maxime.
OpenPGP_0x49E3EE22191725EE.asc
Description: OpenPGP public key
OpenPGP_signature
Description: OpenPGP digital signature