-
-
Notifications
You must be signed in to change notification settings - Fork 348
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
Allow building with Tinygo #1078
base: master
Are you sure you want to change the base?
Conversation
4db1663
to
aae8db1
Compare
Thanks, I'm fine with supporting tinygo builds and adding it to CI. I'm not super pumped about adding tinygo build tags, though. Ideally, tags like https://tinygo.org/docs/reference/lang-support/stdlib/#osuser does show a failure, but that seems like a bug that should be tracked/fixed upstream. |
aae8db1
to
ee4e0b8
Compare
I made tinygo-org/tinygo#4278 to address this. |
With tinygo-org/tinygo#4278 merged a while back, I assume we can now get rid of the build tags here? |
This commit adds package internal/tinygostub that contains stubs for some of the standard library functions that are not available in Tinygo. This allows most of the module to be built with Tinygo.
f39aaec
to
af574e1
Compare
This workflow guarantees that at least these packages build under Tinygo x86_64 and WASM: - mvdan.cc/sh/v3/expand - mvdan.cc/sh/v3/syntax - mvdan.cc/sh/v3/interp
2b3d6e3
to
8693c45
Compare
I got rid of a few stubs, but I still have to stub |
That's very odd. Upstream Go doesn't have SameFile behind any build tags, even though they support js/wasm. It seems to me like TinyGo should at the very least publish the stub themselves; the APIs should compile on all platforms, even if all they do is always fail on the unsupported platforms. |
This PR contains commits that allow
mvdan.cc/sh/v3
to be built using Tinygo. The commit messages will contain more information.