rust-diplomat / diplomat

Experimental Rust tool for generating FFI definitions allowing many other languages to call Rust code
https://rust-diplomat.github.io/book/
Other
532 stars 51 forks source link

JS2 constructors: Support attr constructors #718

Open Manishearth opened 3 weeks ago

Manishearth commented 3 weeks ago

Opaques, structs, and enums should expose their attr constructor as a constructor. This may mean using symbol tricks to keep the internal ctor around.

Default ctor behavior for enums and structs should be unconditionally available with a fromFields() and fromString() method, or something.