vita2d-sys 0.1.1

Low-level bindings for the vita2d library
Documentation

vita2d-sys

Low-level Rust bindings for the vita2d library on PlayStation Vita.

Version License: MIT Build

Table of Contents

Installation

This crate targets the PlayStation Vita toolchain and is intended as a dependency for higher-level wrappers. You will need the VitaSDK and the native prerequisites required by bindgen.

Prerequisites:

  • latest Rust nightly toolchain
  • VitaSDK installed and the VITASDK environment variable set
  • libclang and C headers available to bindgen

Add the dependency:

[dependencies]
vita2d-sys = "0.1.0"

Usage

The API mirrors the C headers closely and is unsafe by design. Use it directly only when you need raw FFI access.

use vita2d_sys::*;

fn main() {
    unsafe {
        vita2d_init();
        vita2d_start_drawing();
        vita2d_clear_screen();
        vita2d_end_drawing();
        vita2d_swap_buffers();
        vita2d_fini();
    }
}

If you have cargo-vita installed, you can build the example VPK:

cargo vita build vpk -- --release --example hello_vita2d

For documentation, you can generate it locally:

cargo doc --open --target armv7-sony-vita-newlibeabihf

or go to the online docs: https://docs.rs/vita2d-sys.

License

MIT. See LICENSE.

Support

Open an issue on GitHub for questions or bug reports: https://github.com/Exotik850/vita2d-sys/issues