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

crypto: use purego tag consistently #58636

Open
FiloSottile opened this issue Feb 22, 2023 · 2 comments
Open

crypto: use purego tag consistently #58636

FiloSottile opened this issue Feb 22, 2023 · 2 comments
Assignees
Labels
NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@FiloSottile
Copy link
Contributor

FiloSottile commented Feb 22, 2023

We've been inconsistent in using the purego tag in the standard library because it was not clear what would be its use aside from letting me benchmark assembly vs native code. I noticed on the Gophers Slack that tagging purego consistently would probably make TinyGo's life easier when trying to compile crypto packages, and presumably any other Go compiler. https://tinygo.org/docs/reference/lang-support/stdlib/#crypto

It's easy enough to do, so why not. Might also add a purego compilation test of crypto/... to longtest.

/cc @dgryski

@FiloSottile FiloSottile added the NeedsFix The path to resolution is known, but the work has not been done. label Feb 22, 2023
@FiloSottile FiloSottile added this to the Go1.21 milestone Feb 22, 2023
@FiloSottile FiloSottile self-assigned this Feb 22, 2023
@dgryski
Copy link
Contributor

dgryski commented Feb 22, 2023

The hash/crc32 package also needs purego tags.

@cuonglm
Copy link
Member

cuonglm commented Feb 22, 2023

FYI, the purego proposal is accepted #23172

I also had https://go-review.googlesource.com/c/go/+/468795, which implements a purego version of hash/maphash. There, you can add the test with purego tag in cmd/dist.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

3 participants