mozilla / uniffi-rs

a multi-language bindings generator for rust
https://mozilla.github.io/uniffi-rs/
Mozilla Public License 2.0
2.48k stars 211 forks source link

Support for projects not using `cargo` #2151

Open emarteca opened 2 weeks ago

emarteca commented 2 weeks ago

Currently, the library_mode generate_bindings calls cargo to retrieve metadata about the project for which bindings are being generated: e.g. generate_bindings starts with this line:

let cargo_metadata = MetadataCommand::new()
        .exec()
        .context("error running cargo metadata")?;

This means uniffi-rs does not work for projects that use a different build system, where cargo is not available and/or where the project is missing a Cargo.toml file.

It would be nice if uniffi-rs was generalized to not be reliant on cargo.