Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

SQLite was one of the first large C code bases to be ported to the web. Alon Zakai (@kripken, the creator of emscripten), made the first commit to sql.js at the start of 2012 [0]. I got involved two years later, and have been maintaining sql.js since. A lot was added since 2012, but the initial core api with 3 functions 'open', 'exec', and 'close' still works today.

https://github.com/kripken/sql.js/commit/cebd80648dbd369b348...



> SQLite was one of the first large C code bases to be ported to the web.

Thank you very much for that info. i'll update the sqlite wasm docs with that.

Edit: updated, thank you! <https://sqlite.org/wasm/info/cacc33abc5d9013f>


> Folks have been building sqlite3 for WASM since as far back as 2012

for *the web*, not for WASM. SQLite was initially compiled to simple javascript, then to asm.js when it appeared, then to WASM when it replaced asm.js :)

The sql.js project is older than the idea of WASM itself. And I like to think it contributed to showing the potential of compiling native code to the browser, and in the creation of the WASM standard.


> for the web, not for WASM.

Docs have been updated. Thank you for the feedback! Edit: for future feedback (from anyone reading this) i can be reached via stephan at sqlite org. i'm unlikely to catch most doc feedback posted to HN.




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: