From 50c0bd4ba7f3f76384da6a299e73d90360dea408 Mon Sep 17 00:00:00 2001 From: Kjetil Orbekk Date: Thu, 4 Aug 2016 23:09:12 -0400 Subject: Rust FFI to gegl. --- src/main.rs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'src') 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()); + } } -- cgit v1.2.3