rust-lang / rust-lang/rust-bindgen
Debugging possible crash for bindgen-generated bindings?
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 5.3k
- Forks
- 829
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 15
Description
Hi,
I'm trying to build a rust wrapper for the V8 JavaScript engine. When attempting to replicate the hello world example from Rust, I get an access violation every time I attempt to create a context, which does not occur when I use it from C++. Hence, I'm either doing something wrong, or there is a problem in the generated bindings.
I've combed through my code and they replicate the c++ calls as far as I can tell, except that I have to provide more params that are left out in c++ as they have default values. The layouts of the structs are also right as far as I can tell.
Is there anything else that I might be overlooking?
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
Start by reproducing the V8 hello world example from the linked C++ sample through the Rust wrapper, focusing on the context-creation call and the bindgen-generated bindings. Compare the Rust arguments and struct layouts with the C++ calls, then document whether the crash comes from wrapper usage or generated bindings and provide a minimal reproducer.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, javascript, rust
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100