spec
spec copied to clipboard
Use enums where possible
Currently, we're passing strings across the ABI boundary to represent static values. Most notable examples are properties and custom function names for hostcalls and callbacks. We should move away from those (string comparison is much more expensive than integers) and provide registries for well-known values supported across proxies.
See discussion in https://github.com/proxy-wasm/spec/pull/42#discussion_r1256815106.