recipes icon indicating copy to clipboard operation
recipes copied to clipboard

Replace `sqlite3` recipe with native WASM version?

Open michaelweinold opened this issue 6 months ago • 0 comments

Unfortunately, a simple sqlite3 test of this kind:

import sqlite3
con = sqlite3.connect("tutorial.db")
cur = con.cursor()
cur.execute("CREATE TABLE movie(title, year, score)")
res = cur.execute("SELECT name FROM sqlite_master")

still does not work with the default drive of either the IndexDB or the LocalStorage drivers, as documented here:

  • https://github.com/jupyterlite/pyodide-kernel/issues/35

However, SQlite from v3.40.0 now includes:

(...) support for compiling SQLite to WASM and running it in web browsers.

it is available for download as

A precompiled bundle of sqlite3.wasm and its JavaScript APIs, ready for use in web applications.

The version included in the emscripten-forge recipes is still v.3.37.2.

Maybe this will solve some of the SQLite/WASM file-system issues.

Would it make sense to use this WASM-native version from now on? How could this be included - persumably, this would not need to be built from source?

michaelweinold avatar Aug 01 '24 05:08 michaelweinold