-
Sqlite version 3.40 adds support for wasm and provides sqlite.wasm file. How to use sqlite.wasm file in leptos? Any example code? Thank you. |
Beta Was this translation helpful? Give feedback.
Answered by
gbj
Dec 1, 2022
Replies: 1 comment
-
Wasm modules basically see one another as opaque ES modules. There shouldn't be any Leptos-specific glue code. Basically, you can use So basically you'd call from Leptos => JS => Sqlite |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
ekanna
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Wasm modules basically see one another as opaque ES modules. There shouldn't be any Leptos-specific glue code. Basically, you can use
wasm-bindgen
to import JavaScript functions and objects to use in Leptos (or any Rust/Wasm framework), and usesqlite
's own docs on how to import its Wasm version into JS.So basically you'd call from Leptos => JS => Sqlite
Relevant Sqlite docs
Relevant
wasm-bindgen
docs