Skip to content

Commit

Permalink
Update Rust nightly (#52)
Browse files Browse the repository at this point in the history
* 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.
  • Loading branch information
parasyte authored Jun 21, 2022
1 parent 5bfe9e1 commit 98f2302
Show file tree
Hide file tree
Showing 25 changed files with 43 additions and 356 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,10 @@ jobs:
args: --all
- name: Cargo n64 build
run: |
cargo install --path cargo-n64
cargo install --path .
dd if=/dev/zero of=/tmp/dummy-ipl3 bs=4032 count=1
git clone https://github.com/rust-console/rrt0.git /tmp/rrt0
cd /tmp/rrt0
cargo n64 build --ipl3 /tmp/dummy-ipl3 -- --package hello-ipl3font
tests:
name: Test
Expand Down
51 changes: 12 additions & 39 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 22 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,25 @@
[workspace]
members = [
"cargo-n64",
"examples/n64lib",
"examples/hello-ipl3font",
]
[package]
name = "cargo-n64"
version = "0.2.0"
authors = ["Jay Oster <jay@kodewerx.org>"]
repository = "https://github.com/rust-console/cargo-n64"
description = "Cargo subcommand to build Nintendo 64 ROMs"
license = "MIT"
readme = "README.md"
categories = ["command-line-utilities", "development-tools", "embedded"]
keywords = ["cli", "cross", "compilation", "nintendo", "n64"]
edition = "2021"

[dependencies]
colored = "2.0"
crc32fast = "1.2"
error-iter = "0.2"
fatfs = "0.3"
goblin = { version = "0.5", default-features = false, features = ["std", "elf32", "elf64", "endian_fd"] }
gumdrop = "0.8"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
thiserror = "1.0"

[profile.release]
lto = "thin"
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ rustup run $(cat rust-toolchain) -- rustup component add rust-src
Install `cargo-n64` from source:

```bash
cargo install --path cargo-n64
cargo install --path .
```

Install `cargo-n64` from [crates.io](https://crates.io/):
Expand All @@ -38,3 +38,7 @@ Nintendo 64 ROMs are flat binaries, and each one is unique. There is no standard
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.

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`.

## Examples

The separate `rrt0` repo has some examples you can build with `cargo-n64`: https://github.com/rust-console/rrt0/tree/main/examples
22 changes: 0 additions & 22 deletions cargo-n64/Cargo.toml

This file was deleted.

1 change: 0 additions & 1 deletion cargo-n64/rust-toolchain

This file was deleted.

24 changes: 0 additions & 24 deletions examples/README.md

This file was deleted.

9 changes: 0 additions & 9 deletions examples/hello-ipl3font/Cargo.toml

This file was deleted.

21 changes: 0 additions & 21 deletions examples/hello-ipl3font/src/main.rs

This file was deleted.

Binary file removed examples/images/hello-ipl3font.png
Binary file not shown.
7 changes: 0 additions & 7 deletions examples/n64lib/Cargo.toml

This file was deleted.

108 changes: 0 additions & 108 deletions examples/n64lib/src/ipl3font.rs

This file was deleted.

4 changes: 0 additions & 4 deletions examples/n64lib/src/lib.rs

This file was deleted.

Loading

0 comments on commit 98f2302

Please sign in to comment.