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

feat: custom RTS functions using a Wasm custom section #4424

Draft
wants to merge 32 commits into
base: master
Choose a base branch
from

Conversation

rvanasa
Copy link
Contributor

@rvanasa rvanasa commented Mar 4, 2024

Alternative to #4413 using a Wasm custom section in place of compiler flags. This makes it simpler to use Rust bindings without relying on external tooling to pass the expected Rust function names.

The current format of the custom section is simply a list of RTS function names separated by semicolon characters (;), ignoring whitespace adjacent to each name, and ignoring empty strings (e.g. hello; echo;).

In the future, we could extend this format to specify the expected Motoko type in a backwards-compatible way (for example, hello; echo : <T>(T) -> T;)

Copy link

github-actions bot commented Mar 4, 2024

Comparing from ea8cf49 to aea7ad5:
The produced WebAssembly code seems to be completely unchanged.

@rvanasa rvanasa requested a review from crusso March 15, 2024 15:34
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

Successfully merging this pull request may close these issues.

None yet

1 participant