Writing php extensions in rust made easy
  • Rust 99.5%
  • C 0.5%
Find a file
2019-04-01 00:06:19 +02:00
examples/helloworld cleanup example 2019-03-27 22:34:12 +01:00
ivory cleanup sys 2019-04-01 00:06:19 +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 most basics of readme 2019-03-27 22:37:23 +01: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, Rust2!");
}

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