Dart Bindgen

A tool for generating Dart FFI bindings to C Header file.

⚠️ This crate is deprecated and 🚧 unmaintained 🚧 for now, please prefer ffigen from the dart team.


Snapshot Testing Security crates.io Documentation
## Goals 1. be able to generate a single `ffi.dart` file that should contain all the C header bindings. 2. Current Supported C Features - [x] Functions - [x] Function Pointer (aka Callbacks) - [x] Simple Structs (NOTE: Nested structs is not supported yet, open a PR?) - [x] C Enums ## Non-Goals Writing a High-Level Abstractions and idiomatic Dart Code for the FFI bindgens, we will leave that as a homework for the user :). ## Install Make sure you have installed the dependencies: 1. LLVM and clang #### on macOS: ``` brew install llvm ``` #### on Windows: Download a prebuild from [here](https://releases.llvm.org/) #### on Linux: you know what to do ;) --- and then you could install the CLI from [github releases](https://github.com/sunshine-protocol/dart-bindgen/releases) or you could also use cargo to build it from source: ```bash $ cargo install --force dart-bindgen --features cli ``` ## Safety This crate uses `#![deny(unsafe_code)]` to ensure everything is implemented in 100% Safe Rust. ## Contributing Want to join us? Check out our ["Contributing" guide][contributing] and take a look at some of these issues: - [Issues labeled "good first issue"][good-first-issue] - [Issues labeled "help wanted"][help-wanted] [contributing]: https://github.com/sunshine-protocol/dart-bindgen/blob/master/.github/CONTRIBUTING.md [good-first-issue]: https://github.com/sunshine-protocol/dart-bindgen/labels/good%20first%20issue [help-wanted]: https://github.com/sunshine-protocol/dart-bindgen/labels/help%20wanted ## License Licensed under Apache v2.0 license.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this crate by you, as defined in the Apache-2.0 license, shall be licensed as above, without any additional terms or conditions.