commit | 91f9f93abc9e802da0eb94e073d6717569fca9fc | [log] [tgz] |
---|---|---|
author | Yamakaky <yamakaky@yamaworld.fr> | Sun Jul 17 22:07:17 2016 +0200 |
committer | Yamakaky <yamakaky@yamaworld.fr> | Sun Jul 17 22:07:17 2016 +0200 |
tree | 09a240a6f84e75d13bcd1e1c3be18c0f6003a6b4 | |
parent | 4256d79d8ed25a975dca12b1c90de9f7598deb51 [diff] |
0.19.0
A native binding generator for the Rust language.
rust-bindgen was originally ported from clay's bindgen.
$ cargo install bindgen
Bindgen will be dynamically linked to your default clang version. See clang-sys if you want to use an other version or do a static link build. The clang-sys feature static
can be activated via the bindgen
feature clang_sys/static
.
$ bindgen <header> [<bindgen options>] [-- <clang options>]
See --help
for a list of the supported options.
bindgen!(header, options...)
The use of this plugin requires the use of a nightly compiler.
Options:
Option Name | Type | Default |
---|---|---|
link | str | |
match | str | |
builtins | bool | true |
allow_unknown_types | bool | false |
clang_args | str |
bindgen --link lua --builtins /usr/include/lua.h -o lua.rs
Cargo.toml
[dependencies] bindgen = "*"
main.rs
#![feature(plugin)] #![plugin(bindgen)] mod lua_bindings { bindgen!("/usr/include/lua.h", link="lua", builtins=true) }