nust64
is a tool for building rust projects into n64 roms. It's intended as a Cargo runner, but may also be used as a library.
For using nust64 as a crate, refer to the docs.
Otherwise, you can install nust64 as a runnable program using cargo install nust64
. If you wish to install from source, download the repo and run cargo install --path .
Once installed, run nust64 --help
for additional details.
First you should install nust64 as described above. Next, if your project doesn't already have it,
create the file .cargo/config.toml
, and include this section:
Toml
[target.mips-nintendo64-none]
runner = [
"nust64",
"--ipl3", "path/to/ipl3.bin",
"--elf"
]
When you cargo run
or cargo run --release
, Cargo will append the runner command with the path to the compiled ELF file for your project, and execute the command.
If you are using a target with a different name, then replace mips-nintendo64-none
with the desired target triple or cfg expression.
If you want to use any arguments that have spaces in it, you must format it like below.. Say you wanted to run the Ares emulator after building the rom:
Toml
[target.mips-nintendo64-none]
runner = [
"nust64",
"--post-exec", "/path/to/ares >>ROM<<",
"--ipl3", "path/to/ipl3.bin",
"--elf"
]
Thanks to the first build tool, cargo-n64
, written by parasyte. I initially relied on that project to learn the basics of what was needed to compile for the n64's architecture.