My personal project and infrastructure archive
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
nomicon/infra/libkookie/overlays/rust/examples/cross-wasi/shell.nix

22 lines
717 B

# See docs/cross_compilation.md for details.
(import <nixpkgs> {
crossSystem = {
config = "wasm32-wasi";
# Nixpkgs currently only supports LLVM lld linker for wasm32-wasi.
useLLVM = true;
};
overlays = [ (import ../..) ];
}).callPackage (
# We don't need WASI C compiler from nixpkgs, so use `mkShellNoCC`.
{ mkShellNoCC, stdenv, rust-bin, wasmtime }:
mkShellNoCC {
nativeBuildInputs = [ rust-bin.stable.latest.minimal ];
depsBuildBuild = [ wasmtime ];
# This is optional for wasm32-like targets, since rustc will automatically use
# the bundled `lld` for linking.
# CARGO_TARGET_WASM32_WASI_LINKER = "${stdenv.cc.targetPrefix}cc";
CARGO_TARGET_WASM32_WASI_RUNNER = "wasmtime";
}) {}