/vitasdk-sys

vitasdk bindings to be used in rust

Primary LanguageRustOtherNOASSERTION

vitasdk-sys

Crates.io License: MIT

This crate exports bindings to functions available in vitasdk and statically links to all of its stubs libraries. Their official docs are here and the bindings are automatically generated from vitasdk's vita-headers repository.

To be able to use it, you need vitasdk available and the environment variable VITASDK set to its location. e.g.:

$ export VITASDK=/opt/vitasdk

There's an example on how to use this crate at examples/std-hello-world.

Manually generating the bindings

Updating

To update the headers, we have a job that runs on GitHub Actions yearly or on demand that will create a PR. If you want to update manually, you can follow these steps:

Manually

Clone the repository with submodules (the C headers):

$ git clone --recurse-submodules https://github.com/pheki/vitasdk-sys.git

If the repository is already cloned, update the submodules with:

$ git submodule update --init --recursive

To update the headers, go to the vita-headers submodule and update by the usual means:

$ cd generator/vita-headers
$ git pull
$ cd ../..

Generate the bindings with:

$ cd generator
$ cargo run

Note that VITASDK must me set as explained at the top of this README. It's required to generate bindings because of the platform includes.

Depending on upstream changes you may need to tweak generator/config.toml (documented at generator/src/config.rs) for the new headers to work. In case you need to, feel free to contribute by opening a pull request.

Versioning

Even though usual semver rules apply for this crate, I believe that vitasdk has some sort of versioning and we're not following it right now. We're just keeping updated with the latest version of vita-headers and generating bindings for them. If you need bindings for newer versions or wish to improve the current situation, feel free to open an issue.

Credits

License

This crate (library) is distributed under terms of MIT license or Apache License (Version 2.0), at your option. See LICENSE-MIT and LICENSE-APACHE for terms.