most basics of readme

This commit is contained in:
Robin Appelman 2019-03-27 22:35:27 +01:00
commit 33ffaac5d9

27
README.md Normal file
View file

@ -0,0 +1,27 @@
# 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")]
});
```