Skip to content

How to use Sqlite.wasm with Leptos? #139

Answered by gbj
ekanna asked this question in Q&A
Discussion options

You must be logged in to vote

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 use sqlite'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

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by ekanna
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants