bytecodealliance / bytecodealliance/wasmtime
Bikeshed: Consider renaming `Config::cranelift_*` methods to `Config::compiler_*`
- Dominant language
- Rust
- Stars
- 18.6k
- Forks
- 1.8k
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 121
Description
This is an issue spawned from [this comment](https://github.com/bytecodealliance/wasmtime/pull/11604/files/07388c12a717179b9f37b656332ec15ac2744eeb#r2323328166) where currently Wasmtime has a number of methods on `Config` which are prefixed with `cranelift_*`. The original intention of this was to clearly indicate that these are Cranelift-specific features and not related to other compilers. The way things have evolved over time, however, is that when Winch is enabled we also use Cranelift to generate trampolines. Additionally many Cranelift settings also affect Winch since it's using many of the same ISA primitives and flags and such.
Given all that while these options are technically correct in that they only affect Cranelift they're also confusing in that they also affect Winch-configured builds. It's probably worth considering renaming these methods to avoid "cranelift" in the name and just say that they're "compiler" related. We can document some of them and their applicability to certain compiler backends (e.g. Winch doesn't respect opt_level for its generated code)
Contributor guide
Assessment
This issue has not been assessed yet.