pub struct FfiGen { /* private fields */ }
Expand description
Main entry point to ffi-gen
.
Implementations§
Source§impl FfiGen
impl FfiGen
Sourcepub fn new<P: AsRef<Path>>(path: P) -> Result<Self>
pub fn new<P: AsRef<Path>>(path: P) -> Result<Self>
Takes a path to an ffi-gen interface description file and constructs
a new FfiGen
instance.
Sourcepub fn generate_rust(&self, abi: Abi) -> Result<String>
pub fn generate_rust(&self, abi: Abi) -> Result<String>
Generates the rust api.
Sourcepub fn wasm_multi_value_shim<P: AsRef<Path>>(&self, path: P) -> Result<()>
pub fn wasm_multi_value_shim<P: AsRef<Path>>(&self, path: P) -> Result<()>
Patches the ffi functions in a wasm blob to use multi-value returns.
Sourcepub fn generate_dart<P: AsRef<Path>>(
&self,
path: P,
library: &str,
cdylib: &str,
) -> Result<()>
pub fn generate_dart<P: AsRef<Path>>( &self, path: P, library: &str, cdylib: &str, ) -> Result<()>
Generates dart bindings for the rust api.
Auto Trait Implementations§
impl Freeze for FfiGen
impl RefUnwindSafe for FfiGen
impl Send for FfiGen
impl Sync for FfiGen
impl Unpin for FfiGen
impl UnwindSafe for FfiGen
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more