vita2d-sys 0.1.1

Low-level bindings for the vita2d library
Documentation
# vita2d-sys

Low-level Rust bindings for the [vita2d](https://github.com/xerpi/libvita2d) library on PlayStation Vita.

[![Version](https://img.shields.io/badge/version-0.1.0-blue.svg)](https://github.com/Exotik850/vita2d-sys)
[![License: MIT](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)
[![Build](https://img.shields.io/badge/build-manual-lightgrey.svg)](https://github.com/Exotik850/vita2d-sys)

## Table of Contents
- [Installation]#installation
- [Usage]#usage
- [License]#license
- [Support]#support

## 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:

```toml
[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.

```rust
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:

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

For documentation, you can generate it locally: 

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

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

## License

MIT. See [LICENSE](LICENSE).

## Support

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