Is it possible to dynamically load an extension? #169
-
I am using electric-sql to build a local-first app. My app uses UUID's in version 7. For rows created client side I can use a js library to create the uuids. I found this extension for sqlite. How can I Maybe the answer is to build locally and integrate that build into wa-sqlite/electric-sql? I am grateful for any insights. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
From my experience it isn't generally possible given some design constraints of the current WASM module loading system and emscripten's If
|
Beta Was this translation helpful? Give feedback.
-
@tantaman knows 100% more (literally) about dynamic loading WASM than I do. Perhaps you can use create_function() to provide a way to call your JavaScript UUID implementation from your trigger? This will only work if UUID creation is synchronous (except for an ugly unsupported hack). |
Beta Was this translation helpful? Give feedback.
@tantaman knows 100% more (literally) about dynamic loading WASM than I do.
Perhaps you can use create_function() to provide a way to call your JavaScript UUID implementation from your trigger? This will only work if UUID creation is synchronous (except for an ugly unsupported hack).