cryspen / libcrux

The formally verified crypto library for Rust
https://cryspen.com/libcrux
Apache License 2.0
48 stars 8 forks source link

Add Nix files and commit `Cargo.lock` #300

Closed pnmadelaine closed 2 weeks ago

pnmadelaine commented 3 weeks ago

Add a Nix expression to build ml-kem

pnmadelaine commented 3 weeks ago

I disabled LTO in the Nix build as it causes the build to fail. Am I missing something, is there a specific toolchain to use? I am using gcc and ld.

pnmadelaine commented 3 weeks ago

using mold instead of ld seems to fix the issue!

pnmadelaine commented 2 weeks ago

@franziskuskiefer I'll just continue the conversation here as github seems to double all my comments on the code (?)

I think you meant using fetch_package was not right because it required installing benchmark manually? I used FetchContent_Declare instead, is that okay with you?

pnmadelaine commented 2 weeks ago

I was just thinking, we should discuss committing flake.lock. If it is committed it needs to be updated regularly, otherwise the nix build will quickly fail and the lock file will become useless anyway. @W95Psp what do you think?

W95Psp commented 2 weeks ago

(quoting myself from https://github.com/cryspen/bertie/pull/118, since it's the same concern)

I see no point in not committing flake.lock, of we don't commit flake.lock, we should drop the nix expressions altogether. The nix job you added will check the nix expressions are up to date as code changes, that's all we need imo. Locked flakes are especially useful to make sure we'll be able to build the project in the future.

pnmadelaine commented 2 weeks ago

converting to draft as this is currently broken after updating