For historical reasons (early on, some of the languages didn't support specifying Wasm import modules), we import all hostcalls from the default (env) namespace and prefix function names with proxy_.
But that was years ago, and the ecosystem evolved significantly, so we should stop polluting the global namespace and use our own module (e.g. proxy_wasm).
With this change, the function names for hostcalls would change, e.g. env.proxy_log -> proxy_wasm.log.
However, all callbacks are exported from the plugin itself, and there is only a single namespace, which means that we should probably keep the proxy_on_ prefix to avoid potential conflicts... But this makes things a bit inconsistent. Should we rename those as well, e.g. proxy_on_log -> on_log?
Any thoughts? @mpwarres @leonm1
For historical reasons (early on, some of the languages didn't support specifying Wasm import modules), we import all hostcalls from the default (
env) namespace and prefix function names withproxy_.But that was years ago, and the ecosystem evolved significantly, so we should stop polluting the global namespace and use our own module (e.g.
proxy_wasm).With this change, the function names for hostcalls would change, e.g.
env.proxy_log->proxy_wasm.log.However, all callbacks are exported from the plugin itself, and there is only a single namespace, which means that we should probably keep the
proxy_on_prefix to avoid potential conflicts... But this makes things a bit inconsistent. Should we rename those as well, e.g.proxy_on_log->on_log?Any thoughts? @mpwarres @leonm1