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

expose go:wasmimport #19

Open
wants to merge 8 commits into
base: wasip1-wasm
Choose a base branch
from

Conversation

achille-roussel
Copy link
Collaborator

No description provided.

if !base.Flag.CompilingRuntime && base.Ctxt.Pkgpath != "syscall/js" && base.Ctxt.Pkgpath != "syscall/js_test" && base.Ctxt.Pkgpath != "syscall" {
p.error(syntax.Error{Pos: pos, Msg: "//go:wasmimport directive cannot be used outside of runtime or syscall/js"})
break
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make this change a separate commit, since it depends on the proposal being accepted and can't be submitted just to fix golang#59156

}

func makeIOVec(b []byte) unsafe.Pointer {
return unsafe.Pointer(&iovec{
buf: uintptr32(uintptr(unsafe.Pointer(unsafe.SliceData(b)))),
Copy link
Collaborator

@johanbrandhorst johanbrandhorst Apr 9, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could this be

Suggested change
buf: uintptr32(uintptr(unsafe.Pointer(unsafe.SliceData(b)))),
buf: uintptr32(uintptr(bytesPointer(b))),

now?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I wanted to verify that it still remains within the inline cost threshold so it doesn't end up causing heap allocations. I may add a test to validate it.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, definitely should make a test for it 👍🏻. Also add a comment.

johanbrandhorst and others added 6 commits April 10, 2023 20:53
Adds crypto/dsa, crypto/rand, x509 files and changes for the new
wasip1 port.

For golang#58141

Co-authored-by: Richard Musiol <[email protected]>
Co-authored-by: Achille Roussel <[email protected]>
Co-authored-by: Julien Fabre <[email protected]>
Co-authored-by: Evan Phoenix <[email protected]>
Change-Id: I9609e3d021cd7e06b813eedf5912febc52cc0f2c
For golang#58141

Co-authored-by: Richard Musiol <[email protected]>
Co-authored-by: Achille Roussel <[email protected]>
Co-authored-by: Julien Fabre <[email protected]>
Co-authored-by: Evan Phoenix <[email protected]>
Change-Id: Ib49b7ccabe18de544455f7d09c7d715d6564a73d
For golang#58141

Co-authored-by: Richard Musiol <[email protected]>
Co-authored-by: Achille Roussel <[email protected]>
Co-authored-by: Julien Fabre <[email protected]>
Co-authored-by: Evan Phoenix <[email protected]>
Change-Id: I09a7cf33e43cb0e17ab3793c22cbad90b9e83b62
Fixes golang#58141

Co-authored-by: Richard Musiol <[email protected]>
Co-authored-by: Achille Roussel <[email protected]>
Co-authored-by: Julien Fabre <[email protected]>
Co-authored-by: Evan Phoenix <[email protected]>
Change-Id: I51dabbf17b8f5540c964f90223d18457f6f9fbef
Fixes golang#58141

Co-authored-by: Richard Musiol <[email protected]>
Co-authored-by: Achille Roussel <[email protected]>
Co-authored-by: Julien Fabre <[email protected]>
Co-authored-by: Evan Phoenix <[email protected]>
Change-Id: I49b66946acc90fdf09ed9223096bfec9a1e5b923
Now that all preceding CLs are merged, the port should
be working.

Change-Id: Ic45eaf42564ea286d0a429aa992c5ec0166945e9
Signed-off-by: Achille Roussel <[email protected]>
Signed-off-by: Achille Roussel <[email protected]>
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.

2 participants