Open abourget opened 1 year ago
It would be nice to be able to customize the "allocate" export name. TinyGo for instance, generates a function called "malloc" instead of "allocate". Perhaps auto-detect, if "allocate" and/or "malloc" exists in the module exports even.
I tried with:
func (b *Bindgen) SetAllocateExport(funcName string) { b.allocateFunc = funcName }
and a new Bindgen variable called allocatedFunc it worked for TinyGo.
allocatedFunc
If you're open to a contribution, let me know.
It would be nice to be able to customize the "allocate" export name. TinyGo for instance, generates a function called "malloc" instead of "allocate". Perhaps auto-detect, if "allocate" and/or "malloc" exists in the module exports even.
I tried with:
and a new Bindgen variable called
allocatedFunc
it worked for TinyGo.If you're open to a contribution, let me know.