-
Notifications
You must be signed in to change notification settings - Fork 254
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
draft: package c2rust as a "nix flake" #440
base: master
Are you sure you want to change the base?
Conversation
Great to see this. I would recommend not committing the ps: #328 can be closed when this is merged. |
@mstone building currently fails because the build tries to download some dependencies.
|
fwiw, my c2rust.nix draft from 2 months ago |
The current Does anyone in this thread knows how to build c2rust on nix? |
Nix flakes are an emerging technology for composing software which solves a related but complementary problem to the one addressed today via
c2rust
'sshell.nix
/nix-shell
support.This PR provides a rough-draft-quality flake for c2rust. Notable future work includes:
aarch64-darwin
, where it works as expected so far, and is able to transpile and run the demo for my current subject of interest, osqp.x86_64-linux
at least due to support offline build #356.The benefit is that flakes enable easy building, development, and usage of c2rust with pinned, shareable, but still easily editable LLVM, clang, and rust toolchain versions via convenient commands like
nix build
nix shell
or with URI-like "flake-refs" (which also support naming specific branches/commits/...) like:
nix build github:mstone/c2rust
,nix shell github:mstone/c2rust
,nix run github:mstone/c2rust
, ornix profile install github:mstone/c2rust
or their upstream equivalents, if merged.