Skip to content

Commit 98f2302

Browse files
authored
Update Rust nightly (#52)
* Fixes the issue described in [Duplicate the rust-toolchain file so the crate can be published #51](#51). * Fixes the bizarre linker error that prevented a proper Rust update in [Update rust-toolchain and dependencies #50](#50). * Updates all packages to Edition 2021. * Moves all examples to the `rrt0` repo. Since that code is not intended to be built on a build platform like Linux, macOS, or Windows.
1 parent 5bfe9e1 commit 98f2302

File tree

25 files changed

+43
-356
lines changed

25 files changed

+43
-356
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,10 @@ jobs:
2424
args: --all
2525
- name: Cargo n64 build
2626
run: |
27-
cargo install --path cargo-n64
27+
cargo install --path .
2828
dd if=/dev/zero of=/tmp/dummy-ipl3 bs=4032 count=1
29+
git clone https://github.com/rust-console/rrt0.git /tmp/rrt0
30+
cd /tmp/rrt0
2931
cargo n64 build --ipl3 /tmp/dummy-ipl3 -- --package hello-ipl3font
3032
tests:
3133
name: Test

Cargo.lock

Lines changed: 12 additions & 39 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,25 @@
1-
[workspace]
2-
members = [
3-
"cargo-n64",
4-
"examples/n64lib",
5-
"examples/hello-ipl3font",
6-
]
1+
[package]
2+
name = "cargo-n64"
3+
version = "0.2.0"
4+
authors = ["Jay Oster <jay@kodewerx.org>"]
5+
repository = "https://github.com/rust-console/cargo-n64"
6+
description = "Cargo subcommand to build Nintendo 64 ROMs"
7+
license = "MIT"
8+
readme = "README.md"
9+
categories = ["command-line-utilities", "development-tools", "embedded"]
10+
keywords = ["cli", "cross", "compilation", "nintendo", "n64"]
11+
edition = "2021"
12+
13+
[dependencies]
14+
colored = "2.0"
15+
crc32fast = "1.2"
16+
error-iter = "0.2"
17+
fatfs = "0.3"
18+
goblin = { version = "0.5", default-features = false, features = ["std", "elf32", "elf64", "endian_fd"] }
19+
gumdrop = "0.8"
20+
serde = { version = "1.0", features = ["derive"] }
21+
serde_json = "1.0"
22+
thiserror = "1.0"
723

824
[profile.release]
925
lto = "thin"

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ rustup run $(cat rust-toolchain) -- rustup component add rust-src
2222
Install `cargo-n64` from source:
2323

2424
```bash
25-
cargo install --path cargo-n64
25+
cargo install --path .
2626
```
2727

2828
Install `cargo-n64` from [crates.io](https://crates.io/):
@@ -38,3 +38,7 @@ Nintendo 64 ROMs are flat binaries, and each one is unique. There is no standard
3838
This makes it challenging to get started with N64 development, in general. You first have to build an OS from scratch, or use a library like [`libdragon`](https://github.com/DragonMinded/libdragon) or [`libn64`](https://github.com/tj90241/n64chain/tree/master/libn64). Then you need a tool (or two, or three!) to convert the object files from the compiler toolchain into a flat binary, add the header and IPL3, and finally fix the IPL3 checksum. `cargo-n64` takes the place of the latter set of tools and plugs in nicely to the Rust/cargo ecosystem.
3939

4040
For copyright purposes, the IPL3 binary is not included in this package. Collecting a working IPL3 binary is left as an exercise for the reader. You will be required to provide the path to your IPL3 with the `--ipl3` command line argument, or extract it from an existing ROM with `--ipl3-from-rom`.
41+
42+
## Examples
43+
44+
The separate `rrt0` repo has some examples you can build with `cargo-n64`: https://github.com/rust-console/rrt0/tree/main/examples

cargo-n64/Cargo.toml

Lines changed: 0 additions & 22 deletions
This file was deleted.

cargo-n64/rust-toolchain

Lines changed: 0 additions & 1 deletion
This file was deleted.

examples/README.md

Lines changed: 0 additions & 24 deletions
This file was deleted.

examples/hello-ipl3font/Cargo.toml

Lines changed: 0 additions & 9 deletions
This file was deleted.

examples/hello-ipl3font/src/main.rs

Lines changed: 0 additions & 21 deletions
This file was deleted.

examples/images/hello-ipl3font.png

-28.7 KB
Binary file not shown.

0 commit comments

Comments
 (0)