-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #134 from rust3ds/improve/docs
Improve documentation and examples
- Loading branch information
Showing
57 changed files
with
3,066 additions
and
791 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,3 +4,4 @@ Cargo.lock | |
|
||
# IDE files | ||
.idea | ||
.vscode |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,27 @@ | ||
# ctru-rs | ||
|
||
A Rust wrapper library for smealum's [ctrulib](https://github.com/smealum/ctrulib). | ||
This repository is home of the `ctru-rs` project, which aims to bring full control of the Nintendo 3DS console to homebrew developers using Rust. | ||
|
||
## Structure | ||
|
||
This repository is organized as follows: | ||
|
||
* `ctru-rs`: Safe, idiomatic wrapper around `ctru-sys` | ||
* [`ctru-rs`](./ctru-rs/) - Safe, idiomatic wrapper around [`ctru-sys`](./ctru-sys/). | ||
* [`ctru-sys`](./ctru-sys/) - Low-level, unsafe bindings to [`libctru`](https://github.com/devkitPro/libctru). | ||
|
||
* `ctru-sys`: Low-level, unsafe bindings to ctrulib. | ||
## Getting Started | ||
|
||
This crate's version changes according to the version of `libctru` | ||
used to generate the bindings, with the following convention: | ||
|
||
* `libctru` version `X.Y.Z-W` | ||
* `ctru-sys` version `XY.Z.P+X.Y.Z-W` | ||
|
||
where `P` is usually 0 but may be incremented for fixes in e.g. | ||
binding generation, `libc` dependency bump, etc. | ||
|
||
It may be possible to build this crate against a different version of `libctru`, | ||
but you may encounter linker errors or ABI issues. A build-time Cargo warning | ||
(displayed when built with `-vv`) will be issued if the build script detects | ||
a mismatch or is unable to check the installed `libctru` version. | ||
Specific information about how to use the crates is present in the individual README for each package. | ||
Have a look at `ctru-rs`' [README.md](./ctru-rs/README.md) for a broad overview. | ||
|
||
## Original version | ||
|
||
This project is based on the efforts the original authors: | ||
* [Eidolon](https://github.com/HybridEidolon) | ||
* [FenrirWolf](https://github.com/FenrirWolf) | ||
This project is based on the efforts of the original authors: | ||
* [Eidolon](https://github.com/HybridEidolon) | ||
* [FenrirWolf](https://github.com/FenrirWolf) | ||
|
||
The old version is archived [here](https://github.com/rust3ds/ctru-rs-old). | ||
|
||
## License | ||
|
||
This project is distributed under the Zlib license. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,15 @@ | ||
[package] | ||
authors = ["Rust3DS Org", "Ronald Kinard <[email protected]>"] | ||
description = "A safe wrapper around smealum's ctrulib." | ||
license = "Zlib" | ||
name = "ctru-rs" | ||
version = "0.7.1" | ||
authors = ["Rust3DS Org", "Ronald Kinard <[email protected]>"] | ||
description = "A safe wrapper around libctru" | ||
repository = "https://github.com/rust3ds/ctru-rs" | ||
keywords = ["3ds", "libctru"] | ||
categories = ["os", "api-bindings", "hardware-support"] | ||
exclude = ["examples"] | ||
license = "Zlib" | ||
edition = "2021" | ||
rust-version = "1.64" | ||
rust-version = "1.70" | ||
|
||
[lib] | ||
crate-type = ["rlib"] | ||
|
@@ -18,7 +22,7 @@ const-zero = "0.1.0" | |
shim-3ds = { git = "https://github.com/rust3ds/shim-3ds.git" } | ||
pthread-3ds = { git = "https://github.com/rust3ds/pthread-3ds.git" } | ||
libc = "0.2.121" | ||
bitflags = "1.0.0" | ||
bitflags = "2.3.3" | ||
widestring = "0.2.2" | ||
|
||
[build-dependencies] | ||
|
@@ -45,6 +49,11 @@ std-threads = [] | |
[package.metadata.cargo-3ds] | ||
romfs_dir = "examples/romfs" | ||
|
||
[package.metadata.docs.rs] | ||
default-target = "armv6k-nintendo-3ds" | ||
targets = [] | ||
cargo-args = ["-Z", "build-std"] | ||
|
||
[[example]] | ||
name = "thread-basic" | ||
required-features = ["std-threads"] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# ctru-rs | ||
|
||
Safe and idiomatic Rust wrapper around [`libctru`](https://github.com/devkitPro/libctru). | ||
|
||
## Getting Started | ||
|
||
Thoroughly read the [`ctru-rs` wiki](https://github.com/rust3ds/ctru-rs/wiki/Getting-Started) to meet the requirements | ||
and to understand what it takes to develop homebrew software on the Nintendo 3DS family of consoles. | ||
After that, you can simply add the crate as a dependency to your project and build your final binary by using [`cargo-3ds`](https://github.com/rust3ds/cargo-3ds) | ||
or by manually compiling for the `armv6k-nintendo-3ds` target. | ||
|
||
## Examples | ||
|
||
Many examples to demonstrate the `ctru-rs` functionality are available in the [`examples`](./examples/) folder. Simply run them via | ||
|
||
```bash | ||
cargo 3ds run --example <example-name> | ||
``` | ||
|
||
## License | ||
|
||
This project is distributed under the Zlib license. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.