Skip to content
The only tool you'll need to hit a Rusty Switch
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
listProcess
megaton-allocator
megaton-example
megaton-hammer
tools
.gitignore
Cargo.toml
README.md
Xargo.toml
aarch64-roblabla-switch.json
link.T
load.meph
rust-toolchain

README.md

Megaton Hammer

Discord

This is still a work in progress. Do not expect something full-featured, stable or easy to use just yet. APIs will break in the blink of an eye.

Megaton Hammer is a Rust toolchain to build all sorts of homebrew for the Nintendo Switch. It is Homebrew ABI compliant, and as such can be loaded by Ace Loader or the HBL without issues.

Documentation

TODO: Host the documentation somewhere stable. Right now, if you're lucky, you might get API docs at https://docs.roblab.la/megaton-hammer/megaton_hammer.

Building

The easiest way to get started is through rustup, as you'll need a very specific nightly:

curl https://sh.rustup.rs -sSf | sh
rustup toolchain add nightly-2018-03-07
rustup default nightly-2018-03-07

You'll also want to use [xargo], a cargo wrapper that will automatically compile libcore for esoteric targets.

cargo install xargo
rustup component add rust-src

Cloning this repo and building megaton-example will yield a binary:

git clone https://github.com/roblabla/megaton-hammer
cd megaton-hammer
env RUST_TARGET_PATH=$PWD xargo build --target aarch64-roblabla-switch -p megaton-example

The generated output will be an ELF. In order to run it on the switch, you'll need to turn it into an NRO. You can use the elf2nxo python script for this. First, install its dependencies, then run it:

pip install --user lz4 pyelftools
python target/aarch64-roblabla-switch/debug/megaton-example target/aarch64-roblabla-switch/debug/megaton-example.nro

Roadmap to Awesomeness

You can find a roadmap in the github projects.

You can’t perform that action at this time.