GitPedia
rust-lang

rust-lang/rust-bindgen

Automatically generates Rust FFI bindings to C (and some C++) libraries.

15 Releases
Latest: 9mo ago
v0.72.1Latest
emilioemilio·9mo ago·August 31, 2025
GitHub

This is just 0.72.0 with a fix for a breaking change in clang (see #3264 and related). **Full Changelog**: https://github.com/rust-lang/rust-bindgen/compare/v0.72.0...v0.72.1

v0.72.0
emilioemilio·1y ago·June 8, 2025
GitHub

Added

  • Report enums in ParseCallbacks.
  • Refactor item_name method to use ItemInfo struct.
  • Add callback to modify contents of macro
  • Discovery callbacks for functions and methods.
  • Options to generate uncallable C++ functions.
  • Provide option to get real virtual fn receiver.

📋 Changed

  • Generate bindings compatible with current rustc version by default.

🗑️ Removed

  • Remove unused which-rustfmt feature
  • Remove warning for opaque forward declarations

🐛 Fixed

  • More sophisticated handling of the triple in rust_to_clang_target
  • Rename *-apple-ios-sim to ...simulator
  • Fix OpenCL vectors that use "ext_vector_type".
  • Fix union layout when it contains 0 sized array.
  • Avoid crashing on variadic unions without layout information.
  • Distinguish char16_t.
  • Fix bugs in --clang-macro-fallback
  • Add missed unsafe in the raw_set_bit function
  • + 4 more
v0.71.1
github-actions[bot]github-actions[bot]·1y ago·December 9, 2024
GitHub

📋 Changes

  • [GitHub]
  • [crates.io]
  • [Users Guide][guide]
  • [API Documentation][docs]

🐛 Fixed

  • Fix `--version` and `--generate-shell-completions` (#3040)
  • Upgrade to this release by updating your `Cargo.toml`:
  • ```toml
  • bindgen = "0.71.1"
  • ```

📦 Install prebuild binaries using `cargo binstall`

  • Just run
  • ```sh
  • cargo binstall bindgen-cli
  • ```

📦 Install prebuilt binaries via shell script

  • ```sh
  • curl --proto '=https' --tlsv1.2 -LsSf https://github.com/rust-lang/rust-bindgen/releases/download/v0.71.1/bindgen-cli-installer.sh | sh
  • ```

📦 Download bindgen-cli 0.71.1

  • | File | Platform | Checksum |
  • |--------|----------|----------|

📦 Compile and install binaries from source

  • Just run
  • ```sh
  • cargo install bindgen-cli
  • ```
  • Thanks to everyone who contributed to this release!
  • Christian Poveda
  • Jan Alexander Steffens (heftig)
  • Want to join us? Check out our [CONTRIBUTING.md][contributing] and take a look
  • + 16 more
v0.71.0
github-actions[bot]github-actions[bot]·1y ago·December 9, 2024
GitHub

📋 Changes

  • [GitHub]
  • [crates.io]
  • [Users Guide][guide]
  • [API Documentation][docs]

Added

  • Add the `ParseCallbacks::new_item_found` callback to expose the original and final name of structs, unions and enums (#2658).
  • Add the `field_type_name` field to `FieldInfo` to expose the name of the type of a field (#2863)
  • Add support for custom attributes with the `--with-attribute-custom` flag (#2866)
  • Allow setting `--rust-target` to any Rust version supported by bindgen (#2993)
  • Use c-string literals if the `--generate-cstr` flag is used for Rust targets after 1.77 under the 2021 edition (#2996)
  • Add the `--rust-edition` flag which allows to select which Rust edition to target. (#3002, #3013)
  • Use `unsafe extern` instead of `extern` in blocks for any Rust target after 1.82. (#3015)

📋 Changed

  • The `--wrap-static-fns` related options no longer require the experimental feature or flag (#2928)
  • Use the `Display` implementation instead of the `Debug` one for `BindgenError` in `bindgen-cli` (#3005)

🗑️ Removed

  • Dropped support for any Clang versions strictly lower than 9.0 (#2932)
  • Dropped support for any Rust version strictly lower than 1.33 (#2993)

🐛 Fixed

  • Represent opaque types in a FFI-safe way (#2880)
  • Use the underlying type of any atomic type instead of panicking (#2920)
  • Use the right characters for newlines on windows (#2923)
  • Inlined namespaces are properly recognized now (#2950)
  • Unsafe calls to `libloading` are now wrapped in `unsafe` blocks when using dynamic loading (#2961)
  • The `ParseCallbacks::field_visibility` callback is now called for newtypes as well (#2967)
  • Gate the use of the `addr_of` and `addr_of_mut` macros under the 1.51 rust version (#2988)
  • Upgrade to this release by updating your `Cargo.toml`:
  • + 3 more

📦 Install prebuild binaries using `cargo binstall`

  • Just run
  • ```sh
  • cargo binstall bindgen-cli
  • ```

📦 Install prebuilt binaries via shell script

  • ```sh
  • curl --proto '=https' --tlsv1.2 -LsSf https://github.com/rust-lang/rust-bindgen/releases/download/v0.71.0/bindgen-cli-installer.sh | sh
  • ```

📦 Download bindgen-cli 0.71.0

  • | File | Platform | Checksum |
  • |--------|----------|----------|

📦 Compile and install binaries from source

  • Just run
  • ```sh
  • cargo install bindgen-cli
  • ```
  • Thanks to everyone who contributed to this release!
  • Brian Ward
  • Christiaan Biesterbosch
  • Christian Poveda
  • + 16 more

📦 Contributing

  • Want to join us? Check out our [CONTRIBUTING.md][contributing] and take a look
  • at some of these issues:
  • [Issues labeled "easy"][easy]
  • [Issues labeled "less easy"][less-easy]
  • Still can't find something to work on? [Drop a comment here.][looking]
  • Want to help improve our documentation? [Check out the issues labeled "docs".][docs-issues]
  • Found a bug with `bindgen`? [File an issue here.][file-issue]
  • [GitHub]: https://github.com/rust-lang/rust-bindgen
  • + 9 more
v0.69.5
github-actions[bot]github-actions[bot]·1y ago·October 8, 2024
GitHub

📦 Install prebuilt binaries via shell script

  • ```sh
  • curl --proto '=https' --tlsv1.2 -LsSf https://github.com/rust-lang/rust-bindgen/releases/download/v0.69.5/bindgen-cli-installer.sh | sh
  • ```

📦 Download bindgen-cli 0.69.5

  • | File | Platform | Checksum |
  • |--------|----------|----------|
v0.70.1
github-actions[bot]github-actions[bot]·1y ago·August 20, 2024
GitHub

📦 Install prebuilt binaries via shell script

  • ```sh
  • curl --proto '=https' --tlsv1.2 -LsSf https://github.com/rust-lang/rust-bindgen/releases/download/v0.70.1/bindgen-cli-installer.sh | sh
  • ```

📦 Download bindgen-cli 0.70.1

  • | File | Platform | Checksum |
  • |--------|----------|----------|
v0.70.0
github-actions[bot]github-actions[bot]·1y ago·August 16, 2024
GitHub

📦 Install prebuilt binaries via shell script

  • ```sh
  • curl --proto '=https' --tlsv1.2 -LsSf https://github.com/rust-lang/rust-bindgen/releases/download/v0.70.0/bindgen-cli-installer.sh | sh
  • ```

📦 Download bindgen-cli 0.70.0

  • | File | Platform | Checksum |
  • |--------|----------|----------|
v0.69.4
github-actions[bot]github-actions[bot]·2y ago·February 4, 2024
GitHub

📦 Install prebuilt binaries via shell script

  • ```sh
  • curl --proto '=https' --tlsv1.2 -LsSf https://github.com/rust-lang/rust-bindgen/releases/download/v0.69.4/bindgen-cli-installer.sh | sh
  • ```

📦 Download bindgen-cli 0.69.4

  • | File | Platform | Checksum |
  • |--------|----------|----------|
v0.69.3
github-actions[bot]github-actions[bot]·2y ago·February 4, 2024
GitHub

📦 Install prebuilt binaries via shell script

  • ```sh
  • curl --proto '=https' --tlsv1.2 -LsSf https://github.com/rust-lang/rust-bindgen/releases/download/v0.69.3/bindgen-cli-installer.sh | sh
  • ```

📦 Download bindgen-cli 0.69.3

  • | File | Platform | Checksum |
  • |--------|----------|----------|
v0.69.2
github-actions[bot]github-actions[bot]·2y ago·January 13, 2024
GitHub

📦 Install prebuilt binaries via shell script

  • ```sh
  • curl --proto '=https' --tlsv1.2 -LsSf https://github.com/rust-lang/rust-bindgen/releases/download/v0.69.2/bindgen-cli-installer.sh | sh
  • ```

📦 Download bindgen-cli 0.69.2

  • | File | Platform | Checksum |
  • |--------|----------|----------|
v0.69.1
github-actions[bot]github-actions[bot]·2y ago·November 2, 2023
GitHub

📦 Install prebuilt binaries via shell script

  • ```sh
  • curl --proto '=https' --tlsv1.2 -LsSf https://github.com/rust-lang/rust-bindgen/releases/download/v0.69.1/bindgen-cli-installer.sh | sh
  • ```

📦 Download bindgen-cli 0.69.1

  • | File | Platform | Checksum |
  • |--------|----------|----------|
v0.69.0
github-actions[bot]github-actions[bot]·2y ago·November 1, 2023
GitHub

📦 Install prebuilt binaries via shell script

  • ```sh
  • curl --proto '=https' --tlsv1.2 -LsSf https://github.com/rust-lang/rust-bindgen/releases/download/v0.69.0/bindgen-cli-installer.sh | sh
  • ```

📦 Download bindgen-cli 0.69.0

  • | File | Platform | Checksum |
  • |--------|----------|----------|
v0.68.1
github-actions[bot]github-actions[bot]·2y ago·September 6, 2023
GitHub

📦 Install prebuilt binaries via shell script

  • ```sh
  • curl --proto '=https' --tlsv1.2 -LsSf https://github.com/rust-lang/rust-bindgen/releases/download/v0.68.1/bindgen-cli-installer.sh | sh
  • ```

📦 Download bindgen-cli 0.68.1

  • | File | Platform | Checksum |
  • |--------|----------|----------|
v0.66.1
pvdrzpvdrz·2y ago·June 20, 2023
GitHub
v0.66.0
pvdrzpvdrz·2y ago·June 14, 2023
GitHub

See the [changelog](https://github.com/rust-lang/rust-bindgen/blob/264075a6362f951e90240a976428f0225652d27c/CHANGELOG.md?#0660) for further information.