Files
minimax/shell.nix
2025-11-03 17:08:44 -08:00

38 lines
651 B
Nix

{
pkgs ? import <nixpkgs> { },
}:
let
rust-channel = pkgs.rust-bin.stable."1.91.0";
rustPlatform = pkgs.makeRustPlatform {
cargo = rust-channel;
rustc = rust-channel;
};
rust-with-wasm-target = rustPlatform.override {
targets = [ "wasm32-unknown-unknown" ];
};
in
pkgs.mkShell {
buildInputs = with pkgs; [
rust-with-wasm-target
cargo
rustc
wasm-bindgen-cli
wasm-pack
bun
clang
pkg-config
openssl
];
shellHook = ''
# Set the linker for the wasm target to clang to avoid potential issues
export CARGO_TARGET_WASM32_UNKNOWN_UNKNOWN_LINKER="${pkgs.clang}/bin/clang"
'';
}