Enable wasm to static link extensions

This commit is contained in:
PThorpe92 2025-01-19 22:44:31 -05:00
parent cc63aac305
commit f13d035965
No known key found for this signature in database
GPG key ID: 66DB3FBACBDD05CC
14 changed files with 26 additions and 68 deletions

View file

@ -1,5 +1,4 @@
mod error;
#[cfg(not(target_family = "wasm"))]
mod ext;
mod function;
mod io;
@ -22,7 +21,6 @@ static GLOBAL: mimalloc::MiMalloc = mimalloc::MiMalloc;
use fallible_iterator::FallibleIterator;
#[cfg(not(target_family = "wasm"))]
use libloading::{Library, Symbol};
#[cfg(not(target_family = "wasm"))]
use limbo_ext::{ExtensionApi, ExtensionEntryPoint};
use log::trace;
use schema::Schema;
@ -139,7 +137,6 @@ impl Database {
_shared_wal: shared_wal.clone(),
syms,
};
#[cfg(not(target_family = "wasm"))]
if let Err(e) = db.register_builtins() {
return Err(LimboError::ExtensionError(e));
}
@ -565,7 +562,6 @@ impl SymbolTable {
pub fn new() -> Self {
Self {
functions: HashMap::new(),
// TODO: wasm libs will be very different
#[cfg(not(target_family = "wasm"))]
extensions: Vec::new(),
}