Writing php extensions in rust made easy
  • Rust 99.5%
  • C 0.5%
Find a file
2019-04-05 21:27:35 +02:00
examples/helloworld more literal type casting 2019-04-05 20:03:49 +02:00
ivory more zval cast tests 2019-04-05 21:27:35 +02:00
tests integration tests for return types 2019-04-05 21:22:14 +02:00
.gitignore Implemented to build empty php extension in Rust 2017-08-12 15:16:07 +08:00
LICENSE Initial commit 2017-08-11 23:38:22 -05:00
README.md remove the need to list all exported functions when declaring the module 2019-04-05 11:21:08 +02:00

Ivory

Writing php extensions in rust

Usage

use ivory::{ivory_export, ivory_module};
use ivory::externs::printf;

#[ivory_export]
fn hello_other(other: String) {
    printf(format!("Hello {}", other));
}

#[ivory_export]
fn hello_world() {
    printf("Hello world, Rust!");
}

ivory_module!({
    name: "demo",
    version: "0.0.1",
    info: &[("demo extension", "enabled")]
});