Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make "allocate" configurable #11

Open
abourget opened this issue Jan 7, 2023 · 0 comments
Open

Make "allocate" configurable #11

abourget opened this issue Jan 7, 2023 · 0 comments

Comments

@abourget
Copy link

abourget commented Jan 7, 2023

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.

If you're open to a contribution, let me know.

abourget pushed a commit to streamingfast/substreams that referenced this issue Jan 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant