mirror of
https://github.com/icewind1991/ivory.git
synced 2026-06-03 18:54:07 +02:00
Writing php extensions in rust made easy
- Rust 99.5%
- C 0.5%
| examples/helloworld | ||
| ivory | ||
| tests | ||
| .gitignore | ||
| LICENSE | ||
| README.md | ||
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")]
});