rust-lang / rust-lang/rust-bindgen
`dynamic_library_name` incompatible with `libloading` version 0.9.0
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 5.3k
- Forks
- 829
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 15
Description
Good day,
libloading changed their API slightly, specifically the trait bounds to Library::new: https://github.com/nagisa/rust_libloading/commit/4b98285041defabf87df73f57051f5d55125758f
As a result, bindings generated with dynamic_library_name present fail to compile.
Generated code should be changed something like this:
pub unsafe fn new<P>(path: P) -> Result<Self, ::libloading::Error>
where
- P: AsRef<::std::ffi::OsStr>,
+ P: ::libloading::AsFilename,
{
let library = ::libloading::Library::new(path)?;
Self::from_library(library)
}
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Locate the code-generation path used when dynamic_library_name is present and inspect the generated Library::new signature. Update the generated bounds to match libloading 0.9.0, then verify that bindings using dynamic_library_name compile with that dependency version.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100