Don't use crane for production #98

Closed
opened 2023-02-08 00:23:36 +00:00 by SuperSandro2000 · 12 comments
SuperSandro2000 commented 2023-02-08 00:23:36 +00:00 (Migrated from github.com)

crane builds each cargo dependency in multiple derivations. This adds over a 100 extra dependencies instead of one vendor directory. This usually slows things down quite a bite. For a release using nixpkgs tools is faster.

crane builds each cargo dependency in multiple derivations. This adds over a 100 extra dependencies instead of one vendor directory. This usually slows things down quite a bite. For a release using nixpkgs tools is faster.
blitz commented 2023-02-08 09:18:03 +00:00 (Migrated from github.com)

Yes, that's at least the plan in my head. The bigger challenge here is how to deal with the unstable toolchain that we require for the UEFI target.

Yes, that's at least the plan in my head. The bigger challenge here is how to deal with the unstable toolchain that we require for the UEFI target.
RaitoBezarius commented 2023-02-08 15:57:18 +00:00 (Migrated from github.com)

Yes, that's at least the plan in my head. The bigger challenge here is how to deal with the unstable toolchain that we require for the UEFI target.

RUSTC_BOOTSTRAP=1

> Yes, that's at least the plan in my head. The bigger challenge here is how to deal with the unstable toolchain that we require for the UEFI target. `RUSTC_BOOTSTRAP=1`
NickCao commented 2023-02-12 01:37:55 +00:00 (Migrated from github.com)

Or https://doc.rust-lang.org/cargo/reference/unstable.html#build-std? I think the problem is that we do not have UEFI core/std packaged in nixpkgs.

Or https://doc.rust-lang.org/cargo/reference/unstable.html#build-std? I think the problem is that we do not have UEFI core/std packaged in nixpkgs.
blitz commented 2023-02-12 10:52:24 +00:00 (Migrated from github.com)

This should be fixable with the next Rust release as the UEFI target has stabilized.

This should be fixable with the next Rust release as the UEFI target has stabilized.
RaitoBezarius commented 2023-03-05 23:39:58 +00:00 (Migrated from github.com)

This should be fixable with the next Rust release as the UEFI target has stabilized.

For anyone asking: https://forge.rust-lang.org/ -- next release is supposed to be out in 2 days. :)

> This should be fixable with the next Rust release as the UEFI target has stabilized. For anyone asking: https://forge.rust-lang.org/ -- next release is supposed to be out in 2 days. :)
RaitoBezarius commented 2023-03-10 15:14:46 +00:00 (Migrated from github.com)

https://github.com/NixOS/nixpkgs/pull/220373 is here, we are still waiting for some upstream changes due to cargo changes on hashes.

https://github.com/NixOS/nixpkgs/pull/220373 is here, we are still waiting for some upstream changes due to cargo changes on hashes.
RaitoBezarius commented 2023-03-26 22:16:00 +00:00 (Migrated from github.com)

rustc 1.68.1 was landed in staging, the next staging cycle should start soon AFAIK. We will be able to start working on this.
If we want to aim for lanzaboote tooling to be included as part of NixOS 23.05 behind an experimental flag for release, let's say 0.3.0 or 0.4.0.

We have approximately 1.3-1.4 months to land all these changes.

Bootspec should become enabled by default in ~7 days (modulo the necessary changes in nixpkgs) and not a feature preview anymore and will probably be part of NixOS 23.05 (I won't jinx it please).

rustc 1.68.1 was landed in staging, the next staging cycle should start soon AFAIK. We will be able to start working on this. If we want to aim for lanzaboote tooling to be included as part of NixOS 23.05 behind an experimental flag for release, let's say 0.3.0 or 0.4.0. We have approximately 1.3-1.4 months to land all these changes. Bootspec should become enabled by default in ~7 days (modulo the necessary changes in nixpkgs) and not a feature preview anymore and will probably be part of NixOS 23.05 (I won't jinx it please).
RaitoBezarius commented 2023-04-14 13:56:49 +00:00 (Migrated from github.com)

Now that Rust stable is there, you can see a PR linked here for moving to nixpkgs infrastructure.

Unfortunately, it cannot be merged because cross compilation infrastructure is not yet ready for UEFI targets. There's work in progress in nixpkgs to get it.

Now that Rust stable is there, you can see a PR linked here for moving to nixpkgs infrastructure. Unfortunately, it cannot be merged because cross compilation infrastructure is not yet ready for UEFI targets. There's work in progress in nixpkgs to get it.
RaitoBezarius commented 2023-04-14 13:56:59 +00:00 (Migrated from github.com)

#148 will move to Rust stable.

#148 will move to Rust stable.
RaitoBezarius commented 2023-04-21 12:15:09 +00:00 (Migrated from github.com)

We have moved to Rust stable with #149. The problem is that we need something like https://github.com/NixOS/nixpkgs/pull/226145 to remove our Crane dependency for "production".

We have moved to Rust stable with #149. The problem is that we need something like https://github.com/NixOS/nixpkgs/pull/226145 to remove our Crane dependency for "production".
RaitoBezarius commented 2023-04-28 15:55:00 +00:00 (Migrated from github.com)

https://github.com/NixOS/nixpkgs/pull/228374 is almost enough to get us there.
All that remains is either a custom UEFI target for Rust or a link wrapper tailored for LINK.exe-style parameters.

https://github.com/NixOS/nixpkgs/pull/228374 is almost enough to get us there. All that remains is either a custom UEFI target for Rust *or* a link wrapper tailored for LINK.exe-style parameters.
alyssais commented 2023-04-28 21:23:37 +00:00 (Migrated from github.com)

NixOS/nixpkgs#228374 is almost enough to get us there.
All that remains is either a custom UEFI target for Rust or a link wrapper tailored for LINK.exe-style parameters.

Assuming that you don't actually need the wrappers for Lanzaboote, this would still work.

> [NixOS/nixpkgs#228374](https://github.com/NixOS/nixpkgs/pull/228374) is almost enough to get us there. > All that remains is either a custom UEFI target for Rust _or_ a link wrapper tailored for LINK.exe-style parameters. Assuming that you don't actually need the wrappers for Lanzaboote, [this](https://github.com/NixOS/nixpkgs/pull/226145/commits/c29dfa75449d02af0064a66c5820cdda656a8204#diff-a0a994f45bb1e601ffe3ad4b0f4a7fa74f4fb2ccb6e714a735a8225e99eb970dR18-R23) would still work.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: raito/lanzaboote#98
No description provided.