-
Notifications
You must be signed in to change notification settings - Fork 11
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: remove strings dependency, optimizations #23
Conversation
GOOS=wasip1 GOARCH=wasm go build -tags std -o example/std_countvowels.wasm ./example/countvowels | ||
GOOS=wasip1 GOARCH=wasm go build -tags std -o example/std_http.wasm ./example/http |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added build tags to the files in example/
so we can keep these single-path locations for the builds and conditionally compile the right code based on which compiler is used.
the downside is we need to maintain two versions of the examples.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bhelx ^ this is one consequence but not a breaking change.
the library does have breaking changes but nothing really extreme
extism call example/std_http.wasm _start --wasi --log-level info --allow-host "jsonplaceholder.typicode.com" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
all go build
-based wasm needs to be invoked via _start
, as it is the only export present when using wasip1
GOOS.
I should mention that in issue wasn't that the "strings" package was included per se... the main issue is that it's not possible to use the main package without having unicode tables included. i.e. if The only way to easily solve this is to move http things to a sub-package like The other approach is to write a custom json encoder that doesn't rely on unicode tables. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. Are there any consequences to this?
@egonelbre - that's a good suggestion. will consider it! |
Anything else we need to merge this? |
I think it's good to go! |
Pulling in #16, just easier to start from a clean branch that has been rebased.
Thanks @syke99 for leading the effort to get this done!