Skip to content

Conversation

@amadigan
Copy link

@amadigan amadigan commented May 1, 2024

termenv compiles where GOOS=js, but fails with GOOS=wasip1 (https://go.dev/blog/wasi). This patch treats wasip1 as js, which for these purposes should be correct.

I was able to run the tests on wasip1 by installing wazero and setting WASMRUNTIME=wazero. The tests failed, when I first ran them, but it looks like the tests make assumptions that would fail for all of the _other targets. This patch also "fixes" the tests (it skips one I wasn't sure how to rewrite for this platform).

A project I'm working on imports this library as a transitive dependency, without this termenv does not build on GOOS=wasip1.

I decided to target wasm rather than js and wasip1 because more GOOS values will probably be added for wasm in the future, but it seems unlikely that wasm will end up running full operating systems tag like 'unix' would apply to.

@mrBen mrBen mentioned this pull request Oct 14, 2025
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.

1 participant