Skip to content
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

Risc0 circuit nix refactor #103

Merged
merged 9 commits into from
May 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ members = [
"kairos-cli",
"kairos-crypto",
"kairos-server",
"kairos-tx",
"kairos-prover/kairos-tx",
"kairos-test-utils",
"kairos-circuit-logic",
"kairos-prover-server-lib",
"kairos-prover/kairos-circuit-logic",
"kairos-prover/kairos-prover-server-lib",
]

[workspace.package]
Expand Down
12 changes: 6 additions & 6 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

38 changes: 16 additions & 22 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -49,30 +49,22 @@
craneLib = inputs.crane.lib.${system}.overrideToolchain rustToolchain;

kairosNodeAttrs = {
src = lib.cleanSourceWith {
src = craneLib.path ./.;
filter = path: type:
(builtins.any (includePath: lib.hasInfix includePath path) [
"/casper-deploy-notifier"
"/kairos-cli"
"/kairos-crypto"
"/kairos-server"
"/kairos-test-utils"
"/kairos-tx"
"/kairos-circuit-logic"
"/kairos-prover-server-lib"
"/Cargo.toml"
"/Cargo.lock"
]) && (
# Allow static files.
(lib.hasInfix "/tests/fixtures/" path) ||
# Default filter (from crane) for .rs files.
(craneLib.filterCargoSources path type)
)
;
src = lib.fileset.toSource {
root = ./.;
fileset = lib.fileset.unions [
./Cargo.toml
./Cargo.lock
./casper-deploy-notifier
./kairos-cli
./kairos-crypto
./kairos-server
./kairos-test-utils
./kairos-prover/kairos-tx
./kairos-prover/kairos-circuit-logic
./kairos-prover/kairos-prover-server-lib
];
};
nativeBuildInputs = with pkgs; [ pkg-config ];

buildInputs = with pkgs; [
openssl.dev
] ++ lib.optionals stdenv.isDarwin [
Expand Down Expand Up @@ -133,6 +125,8 @@

coverage-report = craneLib.cargoTarpaulin (kairosNodeAttrs // {
cargoArtifacts = self'.packages.kairos-deps;
# FIXME fix weird issue with rust-nightly and tarpaulin https://github.com/xd009642/tarpaulin/issues/1499
RUSTFLAGS = "-Cstrip=none";
# Default values from https://crane.dev/API.html?highlight=tarpau#cranelibcargotarpaulin
# --avoid-cfg-tarpaulin fixes nom/bitvec issue https://github.com/xd009642/tarpaulin/issues/756#issuecomment-838769320
cargoTarpaulinExtraArgs = "--features=all-tests --skip-clean --out xml --output-dir $out --avoid-cfg-tarpaulin";
Expand Down
2 changes: 1 addition & 1 deletion kairos-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ clap = { version = "4.5", features = ["derive", "deprecated"] }
hex = "0.4"
thiserror = "1"
kairos-crypto = { path = "../kairos-crypto", features = ["fs"] }
kairos-tx = { path = "../kairos-tx" }
kairos-tx = { path = "../kairos-prover/kairos-tx" }
kairos-server = { path = "../kairos-server" }
reqwest = { version = "0.12", features = ["blocking", "json"] }
serde_json = "1.0"
Expand Down
2 changes: 1 addition & 1 deletion kairos-crypto/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ fs = ["casper-types/std"] # TODO: Change `std` -> `std-fs-io` in the future vers
[dependencies]
hex = "0.4"
thiserror = "1"
kairos-tx = { path = "../kairos-tx", optional = true }
kairos-tx = { path = "../kairos-prover/kairos-tx", optional = true }

# Casper signer implementation.
casper-types = { version = "4", optional = true }
Loading