-
-
Save yuri-potatoq/7f978c60ff48690077bb4616bf9f039b 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 | |
]; | |
}; | |
} | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment