the installer goes to ./bin by default
to do something else you need something like
`| bash -s -- -b /usr/local/bin`
Signed-off-by: Adrian Cole <adrian@tetrate.io>
This implements `path_filestat_set_times` which is the last remaining filesystem function in wasi we formerly stubbed.
Other minor changes:
* this removes all places we import alias path as pathutil, introducing a utility function `joinPath` where that was used to reduce name conflicts.
* this fixes places where we used different variable names for the same parameter between main and test source.
Signed-off-by: Adrian Cole <adrian@tetrate.io>
Before, our README said gojs `GOOS=js compiled wasm` was experimental.
However, as we head to 1.0 we should be more explicit about that.
When we started gojs, there was no likely future where `GOOS=wasi` would
happen in the standard go compiler. This has changed, so we'll only keep
the gojs package around until wasi is usable for two Go releases. Being
in an experimental package helps others know to watch out for this.
Signed-off-by: Adrian Cole <adrian@tetrate.io>
This makes the headings mostly in order by tier, like libraries, then
middleware before compiled binaries.
This also adds Trivy, which was one of the original end users of wazero!
cc @knqyf263 who I asked permission from.
Signed-off-by: Adrian Cole <adrian@tetrate.io>
This implements WASI `sched_yield` with `sys.Osyield` that defaults to
return immediately. This is intentionally left without a built-in
alternative as common platforms such as darwin implement
`runtime.osyield` by sleeping for a microsecond. If we implemented that,
user code would be slowed down without a clear reason why.
Signed-off-by: Adrian Cole <adrian@tetrate.io>
This implements `fd_datasync` in WASI, falling back to normal
`File.Sync` when unsupported. This also backfills missing usage of sync
in GOOS=js. Finally, this updates the WASI status chart based on what's
implemented.
Signed-off-by: Adrian Cole <adrian@tetrate.io>
This implements fd_filestat_set_size and fd_filestat_set_times, which
passes one more test in the rust wasi-testsuite.
Signed-off-by: Adrian Cole <adrian@tetrate.io>
Co-authored-by: Takeshi Yoneda <takeshi@tetrate.io>
This implements WriterAtOffset, which supports WASI `fd_pwrite` and gojs
`fs.write` with offset, which is used to implement `syscall.Pwrite`.
I confirmed this passes the corresponding test in wasi-testsuite as
well.
Signed-off-by: Adrian Cole <adrian@tetrate.io>
This slips our 1.0 date a month while we try to get through
implementation issues around filesystems and various bugs.
While not mentioned in the README, we will move our experimental
syscallfs to an experimental package so that people who are ok with
drift can implement it while we try to target it for a 1.x release
ideally by June. Meanhile, our next pre-release will harden the
permanent APIs around implementing filesystems with existing directories
or go's `fs.FS` implementation.
Signed-off-by: Adrian Cole <adrian@tetrate.io>