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

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

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
35 changes: 28 additions & 7 deletions flake.lock

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

21 changes: 17 additions & 4 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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 = [
Expand Down Expand Up @@ -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 ...
Expand Down
2 changes: 1 addition & 1 deletion opentelemetry-ebpf-profiler
2 changes: 2 additions & 0 deletions rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[toolchain]
channel = "1.88.0"