-
Notifications
You must be signed in to change notification settings - Fork 28
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
Use unsafe.Slice
instead of reflect.SliceHeader
to build byte slice
#65
Conversation
@evacchi sorry for tagging, but could you please take a look, as the linked issue prevents us from using recent versions of |
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.
yes, that is the suggested way since tetratelabs/wazero#1436
https://github.com/tetratelabs/wazero/blob/main/examples/allocation/tinygo/testdata/greet.go#L82
🚀
Thank you for a quick review! Looking forward for a merge 😊 |
I triggered tests. |
d9249ca
to
7020e36
Compare
@knqyf263 sorry, I missed this somehow. I tested on a different environment (including compilation with tinygo v0.31.*) where import was removed by IDE, but forgot this part when was preparing PR. Should be fixed now |
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.
Thanks
@knqyf263 can you please tag a new version? |
Yes, but the main branch is failing... |
Thanks! I see, I will analyze it and open an issue. |
Issue #, if available:
#64
Description of changes:
Use
unsafe.Slice
instead ofreflect.SliceHeader
to build byte sliceBy submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.