Commit Graph

5 Commits

Author SHA1 Message Date
Crypt Keeper
d944c3c70d logging: adds clock scope (#1071)
Signed-off-by: Adrian Cole <adrian@tetrate.io>
2023-01-28 19:11:37 +02:00
Crypt Keeper
65c7d9dd1b gojs: stubs all remaining filesystem calls to ENOSYS (#1001)
This stubs all remaining syscalls for `GOARCH=wasm GOOS=js` to return
ENOSYS, instead of panic'ing. This allows us to see the parameters it
receives.

For example:
```
==> go.syscall/js.valueCall(fs.truncate(path=/tmp/_Go_TestTruncate135754730,length=0))
<== (err=function not implemented,ok=false)
```

Signed-off-by: Adrian Cole <adrian@tetrate.io>
2023-01-03 15:54:29 +08:00
Crypt Keeper
921df7e7a6 cli: adds -hostlogging=filesystem for diagnosing problems (#966)
Signed-off-by: Adrian Cole <adrian@tetrate.io>
2022-12-28 11:38:24 +08:00
Crypt Keeper
1ad900d179 gojs: refactors GOOS and GOARCH specific code into their own packages (#959)
This refactors GOOS and GOARCH specific code into their own packages.
This allows logging interceptors to be built without cyclic package
dependencies.

Signed-off-by: Adrian Cole <adrian@tetrate.io>
2022-12-27 08:45:43 +08:00
Crypt Keeper
3477e61aed Adds gojs for Go generated Wasm (#621)
This adds an experimental package gojs which implements the host side of Wasm compiled by GOARCH=wasm GOOS=js go build -o X.wasm X.go

This includes heavy disclaimers, in part inherited by Go's comments https://github.com/golang/go/blob/go1.19/src/syscall/js/js.go#L10-L11
Due to this many will still use TinyGo instead.

That said, this is frequently asked for and has interesting features including reflection and HTTP client support.

Signed-off-by: Adrian Cole <adrian@tetrate.io>
2022-08-26 13:43:21 +08:00