Wrapper developers can declare a map of environmental variables for application developers to provide.
If you're an application developer, check out
ClientConfig. If you're a wrapper developer, keep reading!
To use environmental variables, wrapper developers must first declare an
Env type and add the
@env directive to methods in the Wrapper Schema. You can learn more about the schema declarations in the Environmental Variables section of the Wrapper Schema documentation.
Environmental variables can be used in both plugin wrappers and Wasm wrappers.
Plugin wrapper developers can access the
Env instance as a class property.
Wasm wrapper developers can access the
Env instance by accepting the
Env as a second argument in their module's methods. When an application developer invokes the method, the environmental variables they set in their
ClientConfig will be provided.