Commit Graph

4 Commits

Author SHA1 Message Date
Crypt Keeper
67cc6d3779 compilationcache: uses version-specific subdirectory (#982)
This makes the version, arch, os tuple into a subdirectory to help
troubleshooting and cache management in general. The version is left
inside the binary key regardless.

Note: when installing via `go install ./cmd/wazero/...` the version ends
up as `dev`. This helps make that obvious. For example.

```bash
$ wazero version
dev
$ ./build/tinygo test -target wasi -c -o os.wasm os
$ wazero run -cachedir=$HOME/.wazero -mount=.:/ -env=HOME=.  os.wasm -test.v
$ find $HOME/.wazero
/Users/adrian/.wazero
/Users/adrian/.wazero/wazero-dev-amd64-darwin
/Users/adrian/.wazero/wazero-dev-amd64-darwin/1f149f4bf475a33023ce33302780bee29ec08e89bd57cfbdf639c65c6009f1a4
```

Signed-off-by: Adrian Cole <adrian@tetrate.io>
2022-12-31 07:01:57 +08:00
Crypt Keeper
958b25e3a6 Extends build compatability to one version behind Go's support policy (#833)
This enforces that wazero will build and operate one version behind Go's
support policy, making wazero's Go policy effectively three versions.

This is to allow libraries with more conservative Go policies to be able
to use wazero, specifically mosn is the first to need this.

Signed-off-by: Adrian Cole <adrian@tetrate.io>
2022-11-01 13:19:57 +08:00
Takeshi Yoneda
be09f7fea0 filecache: include GOOS/GOARCH in the key (#772)
Signed-off-by: Takeshi Yoneda <takeshi@tetrate.io>
2022-08-29 10:55:57 +09:00
Takeshi Yoneda
3b32c2028b Externalize compilation cache by compilers (#747)
This adds the experimental support of the file system compilation cache.
Notably, experimental.WithCompilationCacheDirName allows users to configure
where the compiler writes the cache into.

Versioning/validation of binary compatibility has been done via the release tag
(which will be created from the end of this month). More specifically, the cache
file starts with a header with the hardcoded wazero version.


Fixes #618

Signed-off-by: Takeshi Yoneda <takeshi@tetrate.io>
Co-authored-by: Crypt Keeper <64215+codefromthecrypt@users.noreply.github.com>
2022-08-18 19:37:11 +09:00