diff options
author | Kjetil Orbekk <kjetil.orbekk@gmail.com> | 2016-08-04 23:09:12 -0400 |
---|---|---|
committer | Kjetil Orbekk <kjetil.orbekk@gmail.com> | 2016-08-04 23:09:12 -0400 |
commit | 50c0bd4ba7f3f76384da6a299e73d90360dea408 (patch) | |
tree | 6d081c63c777c6235ad28e2807923638b1273ab9 /src/main.rs | |
parent | 8733acc4a69a55162cfd62a6bf2705dfdb72c5ee (diff) |
Rust FFI to gegl.
Diffstat (limited to 'src/main.rs')
-rw-r--r-- | src/main.rs | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs index e7a11a9..d119473 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,3 +1,14 @@ +extern crate libc; +use std::ptr; + +#[link(name="gegl-0.3")] +extern { +fn gegl_init(argc: *mut i32, argv: *mut *mut libc::c_char); +} + fn main() { - println!("Hello, world!"); + unsafe { + let mut argc : i32 = 0; + gegl_init(&mut argc as *mut i32, ptr::null_mut()); + } } |