Closed ten3roberts closed 1 year ago
The from_js_value procedural macro, used within bindings! does not handle parameterized types
from_js_value
bindings!
Occurs when a compound type (e.g; record) contains a parameterized type.
The from_js_value derive macro generating FromJsValue does not properly qualify the type, in this example, it uses
FromJsValue
Vec<u32>::method which is not valid Rust syntax, rather than <Vec<u32>>::method
Vec<u32>::method
<Vec<u32>>::method
To reproduce (wasm32-unknown-unknown):
wasm_bridge::component::bindgen!({ path: "./wit", world: "bindings" });
package host:bindings interface core { record build { a: list<u32>, } foo: func(q: build) -> u64 } world bindings { import core }
I'd love to help and open a PR to resolve this, are there any other areas I could tackle while I am at it?
The
from_js_value
procedural macro, used withinbindings!
does not handle parameterized typesOccurs when a compound type (e.g; record) contains a parameterized type.
The
from_js_value
derive macro generatingFromJsValue
does not properly qualify the type, in this example, it usesVec<u32>::method
which is not valid Rust syntax, rather than<Vec<u32>>::method
To reproduce (wasm32-unknown-unknown):
I'd love to help and open a PR to resolve this, are there any other areas I could tackle while I am at it?