jco
jco copied to clipboard
Optimizing JS binding output size
When generating many functions with similar bindgen, there tends to be a lot of repeated code. This is by design of the bindgen process, and output size is not currently being optimized.
If we had either a post-analysis which could determine the shared functions, or a bindgen approach based on outputting functions or shared objects (eg enum switches for wasi error codes), that could reduce the bindgen output size considerably.