Created
January 16, 2021 14:49
-
-
Save oxalica/310d9a1ba69fd10123f2d70dc6e00f0b to your computer and use it in GitHub Desktop.
Rust wasm example development environment
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
inputs = { | |
nixpkgs.url = github:nixos/nixpkgs/nixos-unstable; | |
flake-utils.url = github:numtide/flake-utils; | |
rust-overlay.url = github:oxalica/rust-overlay; | |
}; | |
outputs = { nixpkgs, flake-utils, rust-overlay, ... }: | |
flake-utils.lib.eachSystem ["x86_64-linux"] (system: let | |
pkgs = import nixpkgs { | |
inherit system; | |
overlays = [ rust-overlay.overlay ]; | |
}; | |
in { | |
devShell = pkgs.mkShell { | |
nativeBuildInputs = with pkgs; [ | |
(rust-bin.stable.latest.rust.override { | |
targets = [ "wasm32-unknown-unknown" ]; | |
}) | |
wasm-pack | |
wasm-bindgen-cli | |
]; | |
}; | |
} | |
); | |
} |
zopieux
commented
Feb 15, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment