Writing php extensions in rust made easy
  • Rust 99.5%
  • C 0.5%
Find a file
2019-04-03 23:10:45 +02:00
examples/helloworld cleanup 2019-04-01 22:21:07 +02:00
ivory tests and optional arguments 2019-04-03 23:10:45 +02:00
tests tests and optional arguments 2019-04-03 23:10:45 +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 cleanup 2019-04-01 22:21:07 +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",
    functions: &[hello_world, hello_other],
    info: &[("demo extension", "enabled")]
});