Skip to content
This repository was archived by the owner on Jan 2, 2026. It is now read-only.

Commit d8f69bb

Browse files
committed
bindgen headaches galore!!!!!!!!
1 parent 7d24c04 commit d8f69bb

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

headaches.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Headaches involving `wasm-bindgen` and overall Rust ⇾ TS/JS bindgen
2+
3+
- `wasm-bindgen` does not support traits, or struct generics with trait bounds like `struct X<S: TraitImplementer>`
4+
- Crates like `ts_rs` might help but would require a more complex build process to assemble a finished TS/JS project
5+
- Worst case: Manually write JS/TS code to bridge the things unsupported by other bindgen libs
6+
- Would be immensely painful
7+
- Other idea: LOADS of handwritten wrappers for Rust functions, also written in Rust but `wasm-bindgen` compatible.
8+
- For traits like signature, we need to make an extremely generic impl that can be somehow instantiated from js/ts

0 commit comments

Comments
 (0)