diff --git a/Cargo.lock b/Cargo.lock index 2d19d75..e3e68da 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1278,9 +1278,9 @@ checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" [[package]] name = "gimli" -version = "0.32.2" +version = "0.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc6298e594375a7fead9efd5568f0a46e6a154fb6a9bdcbe3c06946ffd81a5f6" +checksum = "0bf7f043f89559805f8c7cacc432749b2fa0d0a0a9ee46ce47164ed5ba7f126c" dependencies = [ "fallible-iterator", "stable_deref_trait", @@ -3596,7 +3596,7 @@ dependencies = [ "cpp_demangle", "fallible-iterator", "flate2", - "gimli 0.32.2", + "gimli 0.33.0", "intervaltree", "lru 0.16.0", "memmap2", diff --git a/Cargo.toml b/Cargo.toml index afe95ad..596de21 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ name = "devfiler" version = "0.14.0" edition = "2021" -rust-version = "1.84.1" +rust-version = "1.88.0" license = "Apache-2.0" [profile.dev] diff --git a/flake.lock b/flake.lock index e2a23d6..39e0655 100644 --- a/flake.lock +++ b/flake.lock @@ -2,11 +2,11 @@ "nodes": { "crane": { "locked": { - "lastModified": 1752625801, - "narHash": "sha256-T1XWEFfw+iNrvlRczZS4BkaZJ5W3Z2Xp+31P2IShJj8=", + "lastModified": 1773189535, + "narHash": "sha256-E1G/Or6MWeP+L6mpQ0iTFLpzSzlpGrITfU2220Gq47g=", "owner": "ipetkov", "repo": "crane", - "rev": "471f8cd756349f4e86784ea10fdc9ccb91711fca", + "rev": "6fa2fb4cf4a89ba49fc9dd5a3eb6cde99d388269", "type": "github" }, "original": { @@ -35,11 +35,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1752620740, - "narHash": "sha256-f3pO+9lg66mV7IMmmIqG4PL3223TYMlnlw+pnpelbss=", + "lastModified": 1767313136, + "narHash": "sha256-16KkgfdYqjaeRGBaYsNrhPRRENs0qzkQVUooNHtoy2w=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "32a4e87942101f1c9f9865e04dc3ddb175f5f32e", + "rev": "ac62194c3917d5f474c1a844b6fd6da2db95077d", "type": "github" }, "original": { @@ -53,7 +53,28 @@ "inputs": { "crane": "crane", "flake-utils": "flake-utils", - "nixpkgs": "nixpkgs" + "nixpkgs": "nixpkgs", + "rust-overlay": "rust-overlay" + } + }, + "rust-overlay": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1773284828, + "narHash": "sha256-0qI+a9z7KpYCBbp4ENN32b2tf0VmC3MhgFw1KAroqxQ=", + "owner": "oxalica", + "repo": "rust-overlay", + "rev": "2b18fe48d9a8a4ff3850d56b67cfe72f2a589237", + "type": "github" + }, + "original": { + "owner": "oxalica", + "repo": "rust-overlay", + "type": "github" } }, "systems": { diff --git a/flake.nix b/flake.nix index 4d9d26d..ba78891 100644 --- a/flake.nix +++ b/flake.nix @@ -4,11 +4,13 @@ inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05"; flake-utils.url = "github:numtide/flake-utils"; + rust-overlay.url = "github:oxalica/rust-overlay"; + rust-overlay.inputs.nixpkgs.follows = "nixpkgs"; crane.url = "github:ipetkov/crane"; crane.inputs.nixpkgs.follows = "nixpkgs"; }; - outputs = { crane, flake-utils, nixpkgs, ... }: + outputs = { crane, flake-utils, nixpkgs, rust-overlay, ... }: flake-utils.lib.eachSystem [ "aarch64-linux" "x86_64-linux" @@ -17,13 +19,19 @@ ] (system: let - pkgs = import nixpkgs { inherit system; }; + pkgs = import nixpkgs { + inherit system; + overlays = [ rust-overlay.overlays.default ]; + }; llvm = pkgs.llvmPackages_16; stdenv = llvm.stdenv; lib = pkgs.lib; isLinux = stdenv.isLinux; isDarwin = stdenv.isDarwin; - craneLib = (crane.mkLib pkgs); + + # Use Rust toolchain from rust-toolchain.toml (matches Cargo.toml rust-version) + rustToolchain = pkgs.rust-bin.fromRustupToolchainFile ./rust-toolchain.toml; + craneLib = (crane.mkLib pkgs).overrideToolchain rustToolchain; # Filter source tree to avoid unnecessary rebuilds. includedSuffixes = [ @@ -145,7 +153,12 @@ RUSTFLAGS = toString [ # Mold speeds up the build by a few seconds. # It doesn't support macOS: only use it on Linux. - (lib.optional isLinux "-Clink-arg=--ld-path=${pkgs.mold-wrapped}/bin/mold") + # Use clang as the linker driver so --ld-path is recognized + # (older GCC doesn't support that flag). + (lib.optionals isLinux [ + "-Clinker=${llvm.clang}/bin/clang" + "-Clink-arg=--ld-path=${pkgs.mold}/bin/mold" + ]) # On Darwin, librocksdb-sys links C++ libraries in some weird # way that doesn't work with `buildInputs`. Link it manually ... diff --git a/opentelemetry-ebpf-profiler b/opentelemetry-ebpf-profiler index 422ac29..63d24dc 160000 --- a/opentelemetry-ebpf-profiler +++ b/opentelemetry-ebpf-profiler @@ -1 +1 @@ -Subproject commit 422ac29bb87685fdfdcab3e0e7c77b1f31a3773c +Subproject commit 63d24dc4dd7fd5e369bc2b2933fafba051e6194e diff --git a/opentelemetry-proto b/opentelemetry-proto index a895173..ca839c5 160000 --- a/opentelemetry-proto +++ b/opentelemetry-proto @@ -1 +1 @@ -Subproject commit a8951735f7801e8adfaec5c0ace9262771cfec6e +Subproject commit ca839c51f706f5d53bfb46f06c3e90c3af3a52c6 diff --git a/rust-toolchain.toml b/rust-toolchain.toml new file mode 100644 index 0000000..e88baf1 --- /dev/null +++ b/rust-toolchain.toml @@ -0,0 +1,2 @@ +[toolchain] +channel = "1.88.0"