These scripts are designed to simplify the building Wii U homebrew software with Rust. They use a custom target specification along with the (currently unstable) cargo script feature.
- Add submodule (or clone)
git submodule add https://github.com/rust-wiiu/cafe-scripts scripts
git submodule update --init --recursive[toolchain]
channel = "nightly"
components = ["rust-src", "rust-analyzer"][alias]
wuhb = "-Zscript scripts/wuhb.rs"
[build]
target = "scripts/powerpc-cafe-nintendo.json"
[unstable]
build-std = ["core", "alloc", "compiler_builtins"]
build-std-features = ["compiler-builtins-mem"]
json-target-spec = true
unstable-options = true- Run script via cargo (flags are passed to
cargo build)
cargo wuhb # --releasegit submodule update --remote --merge scriptsA target specification is a description of a machine type which is used by Rust, more specificailly LLVM and the linker, to create machine code acording to the available hardware. For example, you may be already using the x86_64-unknown-linux-gnu target2, meaning you compile code for a x86-64 architecture linux system with available GNU abi.
cargo script is a proposed feature to create single-file packages (no manifest, src folder, etc.), especially useful for cross-platform scripting or experimentation. It it currently in stabilization phase.