bytecodealliance / bytecodealliance/wasmtime
Configure compilation caching without config files
- Dominant language
- Rust
- Stars
- 18.6k
- Forks
- 1.8k
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 121
Description
#### Feature
For embedding wasmtime, i.e., usage via a language bindings, it would be nice if the config cache related settings could be provided via API calls, not config files.
#### Benefit
For use cases embedding wasmtime, it might not be desirable to expose the config file to users of the project that's using wasmtime inside. Furthermore, deploying a configuration file, and handling its absolute path is cumbersome for deployment.
E.g. if there's a CLI application that's using wasmtime, and the user would download the executable and run it, we'd either have to
1. create a config in a temp directory on the fly and remove it afterwards, or
2. instruct the user to put a config into the right place
#### Implementation
It would be nice if the compilation cache settings were exposed in the same way other settings are -- sketching in Go, it could be
```go
func (*Config) SetCache(enabled bool)
func (*Config) SetCacheDirectory(path string)
```
etc.
#### Alternatives
Maybe what I'm thinking about here would be abusing the cache system? 🤔 I don't know...
Contributor guide
Assessment
This issue has not been assessed yet.