Skip to content

Releases: pankcuf/ferment

Custom conversion support

07 Dec 10:34
2bcc4bb
Compare
Choose a tag to compare

What's Changed

Full Changelog: v0.1.1...v0.1.4

v0.1.1: Nested crates Support

22 Oct 15:31
Compare
Choose a tag to compare

v0.1.1:

fix: merge imports (when multiple items in one mod)
feat: multiple crates support
example: nested fermented crates expansion

extern crate cbindgen;
extern crate ferment;

use std::process::Command;
/// Now we can use `with_crates` to pass names of crates that use `[ferment::export]`
fn main() {
    match ferment::Builder::new()
        .with_crates(vec!["ferment_example".to_string()])
        .generate() {
        Ok(()) => match Command::new("cbindgen")
            .args(&["--config", "cbindgen.toml", "-o", "target/example.h"])
            .status() {
            Ok(status) => println!("Bindings generated into target/example.h with status: {}", status),
            Err(err) => panic!("Can't generate bindings: {}", err)
        }
        Err(err) => panic!("Can't create FFI expansion: {}", err)
    }
}