Skip to content

Instantly share code, notes, and snippets.

@Nircek
Created July 16, 2023 22:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Nircek/cfc3b1684fde2970c10326cf104ba675 to your computer and use it in GitHub Desktop.
Save Nircek/cfc3b1684fde2970c10326cf104ba675 to your computer and use it in GitHub Desktop.
rust wasm environment
let
moz_overlay = import (builtins.fetchTarball
"https://github.com/oxalica/rust-overlay/archive/master.tar.gz");
nixpkgs = import <nixpkgs> { overlays = [ moz_overlay ]; };
in { pkgs ? nixpkgs }:
pkgs.mkShell {
name = "rust env";
buildInputs = with pkgs; [
(rust-bin.stable.latest.default.override {
# extensions = [ "rust-src" ]; # for rust-analyzer
targets = [ "x86_64-unknown-linux-gnu" "wasm32-unknown-unknown" ];
})
cargo-generate
wasm-pack
wasm-bindgen-cli
binaryen # wasm-opt; see https://github.com/NixOS/nixpkgs/issues/156890#issuecomment-1119221502
pkg-config
openssl
# sqlite
];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment