rust-lightning/c-bindings-gen/Cargo.toml
Matt Corallo 48e8678a9a Add tool to read a Rust crate and generate C-compatible wrappers
In general, it maps:
 * Traits to a struct with a void* and a list of function pointers,
   emulating what the compiler will do for a dyn trait anyway,
 * Structs as a struct with a single opaque pointer to the
   underlying type and a flag to indicate ownership. While this is
   a bit less effecient than just a direct pointer, it neatly lets
   us expose in the public interface the concept of ownership by
   setting a flag in the generated struct.
 * Unit enums as enums with each type copied over and conversion
   functions,
 * Non-unit enums have each field converted back and forth with a
   type flag and a union across all the C-mapped fields.
2020-09-10 21:58:44 -04:00

12 lines
272 B
TOML

[package]
name = "c-bindings-gen"
version = "0.0.1"
authors = ["Matt Corallo"]
edition = "2018"
[dependencies]
syn = { version = "1", features = ["full", "extra-traits"] }
proc-macro2 = "1"
# We're not in the workspace as we're just a binary code generator:
[workspace]