Rust idiomatic bindings to the Pepper API. This API is experimental. Expect it to change somewhat.
You'll need to build and install the PNaCl/NaCl Rust fork first. Then run:
bash
export NACL_SDK_ROOT=path/to/pepper_37-38
Lastly, run:
bash
cargo build --target le32-unknown-nacl
And profit!
Don't run build.sh
. It is used to update FFI bindings.
Taken from pnacl-hello-world:
```rust
extern crate ppapi;
use std::collections::HashMap;
// Called when an instance is created.
// This is called from a new task. It is perfectly "safe" to panic!() here, or in
// any callback (though it will result in instance termination).
pub extern fn ppapiinstancecreated(_instance: ppapi::Instance,
_args: HashMap
pub extern fn ppapiinstancedestroyed() { } ```
Unsupported due to rust-ppapi's use of threads.