Cleans up the WASM environment handling.
Instead of passing the entire script resolver as a pointer to the WebAssemblyEnv, we now have split off the data actually relevant to the environment into it's own class, which is stored inside of an Arc.
This commit is contained in:
@@ -28,6 +28,7 @@ pub struct Species {
|
||||
/// A cached String Key to get the default form.
|
||||
static DEFAULT_KEY: conquer_once::OnceCell<StringKey> = conquer_once::OnceCell::uninit();
|
||||
|
||||
/// Gets the StringKey for "default". Initialises it if it does not exist.
|
||||
fn get_default_key() -> StringKey {
|
||||
DEFAULT_KEY.get_or_init(|| StringKey::new("default")).clone()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user