diff --git a/proc/Cargo.toml b/proc/Cargo.toml index d7c3a9a..19fe50c 100644 --- a/proc/Cargo.toml +++ b/proc/Cargo.toml @@ -13,3 +13,6 @@ syn = { workspace = true } quote = { workspace = true } proc-macro2 = { workspace = true } heck = { workspace = true } + +[target.'cfg(target_os = "linux")'] +rustflags = ["-C", "link-arg=-fuse-ld=mold"] diff --git a/shell.nix b/shell.nix index a84dcd7..a4c3248 100644 --- a/shell.nix +++ b/shell.nix @@ -2,10 +2,10 @@ {pkgs?import{}}:let stdenv = pkgs.clang19Stdenv; name = "tengri"; - nativeBuildInputs = with pkgs; [ pkg-config libclang ]; - buildInputs = with pkgs; [ libclang ]; + nativeBuildInputs = [ pkgs.pkg-config pkgs.libclang pkgs.mold ]; + buildInputs = [ pkgs.libclang ]; LIBCLANG_PATH = "${pkgs.libclang.lib.outPath}/lib"; - LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath (with pkgs; []); + LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath []; in pkgs.mkShell.override { inherit stdenv; } { diff --git a/tengri/Cargo.toml b/tengri/Cargo.toml index c14cdf8..74b46ad 100644 --- a/tengri/Cargo.toml +++ b/tengri/Cargo.toml @@ -22,3 +22,6 @@ tengri_tui = { optional = true, path = "../tui" } tengri_proc = { path = "../proc" } tengri = { path = ".", features = [ "dsl" ] } crossterm = { workspace = true } + +[target.'cfg(target_os = "linux")'] +rustflags = ["-C", "link-arg=-fuse-ld=mold"]