Andrea Ciliberti
1 year ago
7 changed files with 78 additions and 27 deletions
@ -1,33 +1,27 @@
@@ -1,33 +1,27 @@
|
||||
# ctru-rs |
||||
|
||||
A Rust wrapper around [libctru](https://github.com/devkitPro/libctru). |
||||
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 `libctru`. |
||||
## 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: |
||||
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. |
||||
|
@ -0,0 +1,23 @@
@@ -0,0 +1,23 @@
|
||||
# ctru-rs |
||||
|
||||
Safe and idiomatic Rust wrapper around [`libctru`](https://github.com/devkitPro/libctru). |
||||
This crate uses the bindings provided by [`ctru-sys`](../ctru-sys/). |
||||
|
||||
## 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. |
@ -0,0 +1,33 @@
@@ -0,0 +1,33 @@
|
||||
# ctru-sys |
||||
|
||||
Raw Rust bindings over the [`libctru`](https://github.com/devkitPro/libctru) C library. |
||||
|
||||
## Requirements |
||||
|
||||
To use the bindings provided by this crate you will need to link against the [`libctru`](https://github.com/devkitPro/libctru) library. |
||||
Consult the [`ctru-rs` wiki](https://github.com/rust3ds/ctru-rs/wiki/Getting-Started) to learn how to obtain the required packages |
||||
to use this library. |
||||
|
||||
## Version |
||||
|
||||
This crate's version changes according to the version of `libctru` |
||||
used to generate the bindings, with the following convention: |
||||
|
||||
* [`libctru`](https://github.com/devkitPro/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`](https://github.com/devkitPro/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`](https://github.com/devkitPro/libctru) version. |
||||
|
||||
## Generating bindings |
||||
|
||||
Bindings of new versions of [`libctru`](https://github.com/devkitPro/libctru) can be built using the integrated [`bindgen.sh`](./bindgen.sh) script. |
||||
|
||||
## License |
||||
|
||||
This project is distributed under the Zlib license. |
Loading…
Reference in new issue