Skip to content

Instantly share code, notes, and snippets.

@sakex
Created June 23, 2020 18:25
Show Gist options
  • Save sakex/242bf5570da1592d5808c3f06a48de17 to your computer and use it in GitHub Desktop.
Save sakex/242bf5570da1592d5808c3f06a48de17 to your computer and use it in GitHub Desktop.
// src/bindings.rs
use std::ffi::c_void;
#[link(name = "gui", kind = "static")]
extern "C" {
/// Return a void pointer from the heap, the alternative would have been to write recursively
/// all the fields in a #[repr(C)] struct Engine ...
pub fn engine_factory() -> *mut c_void;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment