Browse Source

Update README for new versioning scheme + env vars

pull/141/head
Ian Chamberlain 1 year ago
parent
commit
b14cdf10f1
No known key found for this signature in database
GPG Key ID: AE5484D09405AA60
  1. 27
      ctru-sys/README.md

27
ctru-sys/README.md

@ -10,23 +10,16 @@ to use this library. @@ -10,23 +10,16 @@ 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.
Crate bindings are generated at build time, so the available APIs will depend on the
installed version of `libctru` when the crate is built. If you want to check
what version of `libctru` is being built, you can examine these environment
variables with [`env!`](https://doc.rust-lang.org/std/macro.env.html):
* `LIBCTRU_VERSION`: full version string (e.g. `"2.3.1-4"`)
* `LIBCTRU_MAJOR`: major version (e.g. `"2"` for version `2.3.1-4`)
* `LIBCTRU_MINOR`: minor version (e.g. `"3"` for version `2.3.1-4`)
* `LIBCTRU_PATCH`: patch version (e.g. `"1"` for version `2.3.1-4`)
* `LIBCTRU_RELEASE`: release version (e.g. `"4"` for version `2.3.1-4`)
## License

Loading…
Cancel
Save