denoland / denoland/deno_bindgen
feat: Support for C and perhaps other languages too
- Dominant language
- Rust
- Stars
- 320
- Forks
- 28
- PR merge metrics
- No merged PRs in 30d
Description
It would be nice to have support for more languages than just rust, but I understand if that is out of the scope of the project at the moment. Anyways I propose splitting up codegen into a different crate and removing `serde` instead opting for encoding and decoding `repr(C)` objects in js directly using the new `UnsafePointerView` (wrote a small prototype in ts to prove that this works which it does).
This approach would let us continue using the macro for rust, and possibly reusing the codegen for analyzing other languages such as C header files while being more intuitive and most likely performant.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by examining the existing codegen and Rust macro paths, then review the proposed TypeScript prototype using UnsafePointerView. Compare the current serde-based encoding and decoding with repr(C) objects in JavaScript and determine how C header analysis would fit. Done means a decided design and working support for C or another additional language.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, deno, rust, typescript
- Domain
- compilers, devtools
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100