#!/usr/bin/env nu # Build the checked-in shell from the shared workspace for WASI. def main [] { let here = $env.FILE_PWD $env.SAUSAGE_CWD_INIT = ($env.SAUSAGE_CWD_INIT? | default ($here | path join .. cwd-init init.o | path expand)) $env.CARGO_TARGET_WASM32_WASIP2_LINKER = ($env.CARGO_TARGET_WASM32_WASIP2_LINKER? | default ($here | path join .. cwd-init link.nu | path expand)) $env.CARGO_TARGET_WASM32_WASIP2_RUSTFLAGS = '-C link-arg=sausage-cwd-init' ^cargo build --manifest-path ($here | path join .. .. Cargo.toml) -p brush-shell --release --features minimal,tokio/time --no-default-features --target wasm32-wasip2 --locked if $env.LAST_EXIT_CODE != 0 { error make {msg: 'brush build failed'} } }