diff --git a/Cargo.toml b/Cargo.toml
index ffa0fb0..4c8d8a6 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -12,9 +12,10 @@ crate_type = ["rlib"]
path = "src/lib.rs"
[features]
-c_interface = []
+ffi = []
serde = ["dep:serde"]
-default = ["serde"]
+wasm = ["dep:wasmer", "dep:unique-type-id", "dep:unique-type-id-derive"]
+default = ["serde", "wasm"]
[profile.dev]
opt-level = 0
@@ -50,7 +51,11 @@ rand_pcg = "0.3.1"
hashbrown = "0.12.1"
indexmap = "1.8.2"
parking_lot = "0.12.1"
+conquer-once = "0.3.2"
serde = { version = "1.0.137", optional = true, features = ["derive"] }
+wasmer = { version = "2.3.0", optional = true, default-features = false, features = ["default-cranelift", "universal", "experimental-reference-types-extern-ref"] }
+unique-type-id = { version = "1.0.0", optional = true }
+unique-type-id-derive = { version = "1.0.0", optional = true }
[dev-dependencies]
csv = "1.1.6"
diff --git a/src/dynamic_data/libraries/dynamic_library.rs b/src/dynamic_data/libraries/dynamic_library.rs
index 3fd9d48..df42306 100644
--- a/src/dynamic_data/libraries/dynamic_library.rs
+++ b/src/dynamic_data/libraries/dynamic_library.rs
@@ -1,4 +1,3 @@
-use std::ffi::c_void;
use std::ops::Deref;
use std::sync::Arc;
@@ -15,6 +14,7 @@ use crate::{PkmnResult, StringKey};
/// The dynamic library stores a static data library, as well as holding different libraries and
/// calculators that might be customized between different generations and implementations.
#[derive(Debug)]
+#[cfg_attr(feature = "wasm", derive(unique_type_id_derive::UniqueTypeId))]
pub struct DynamicLibrary {
/// The static data is the immutable storage data for this library.
static_data: StaticData,
@@ -75,7 +75,7 @@ impl DynamicLibrary {
/// can be created with this combination, returns None.
pub fn load_script(
&self,
- owner: *const c_void,
+ owner: *const u8,
_category: ScriptCategory,
_key: &StringKey,
) -> PkmnResult