TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

SQLite compiled into JavaScript via Emscripten

199 pointsby sea6earover 9 years ago

12 comments

rhc2104over 9 years ago
Sql.js is awesome. It powers sqlteaching.com (on the client side), and the whole site took about 50 hours of work between my wife and I. Most of that time was on the curriculum.
评论 #10200937 未加载
评论 #10203060 未加载
评论 #10201751 未加载
评论 #10201028 未加载
SEJeffover 9 years ago
FYI this is what powers the interactive SQL engine for the SQL classes on the Khan Academy. If you&#x27;ve never seen them, it is really cool.<p><a href="http:&#x2F;&#x2F;www.brianbondy.com&#x2F;blog&#x2F;168&#x2F;sql-on-khan-academy-enabled-by-sqlite-sqljs-asmjs-and-emscripten" rel="nofollow">http:&#x2F;&#x2F;www.brianbondy.com&#x2F;blog&#x2F;168&#x2F;sql-on-khan-academy-enabl...</a><p><a href="https:&#x2F;&#x2F;www.khanacademy.org&#x2F;computing&#x2F;computer-programming&#x2F;sql" rel="nofollow">https:&#x2F;&#x2F;www.khanacademy.org&#x2F;computing&#x2F;computer-programming&#x2F;s...</a>
timeuover 9 years ago
Would be interesting to see how this benchmarks against the in-memory db of lovefield (<a href="https:&#x2F;&#x2F;github.com&#x2F;google&#x2F;lovefield" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;google&#x2F;lovefield</a>)
myoonover 9 years ago
Unfortunately, there are a few major downsides to sql.js:<p>1. Not API compatible with node-sqlite3, so you can&#x27;t just drop it in and use it with knex or other wrappers.<p>2. Doesn&#x27;t support in-place editing of a db. You have to load the entire DB into memory, modify it, and then save it back, making it unsuitable for any concurrent application.<p>I love the idea of the project though, and it would be awesome not to have to deal with compiling sqlite or using node-pregyp to build embedded chromium apps.
评论 #10200730 未加载
评论 #10201081 未加载
评论 #10201459 未加载
评论 #10200851 未加载
评论 #10201033 未加载
pygy_over 9 years ago
What I would love to see is a SQLite rewrite in Rust. Just enough to support WebSQL and appease Mozilla&#x27;s concern about the lack of alternative implementations.
评论 #10201154 未加载
评论 #10201042 未加载
评论 #10200735 未加载
评论 #10202043 未加载
SunboXover 9 years ago
Did someone try to compile Zebra Crossing (ZXing) to JavaScript using Emscripten? I searched a lot, but sadly didn&#x27;t find anyone who succeeded. And I don&#x27;t have enough knowledge about C++ to try it myself.
评论 #10203192 未加载
kgenover 9 years ago
SQL.js is a great library -- we use it on <a href="http:&#x2F;&#x2F;sqlbolt.com&#x2F;" rel="nofollow">http:&#x2F;&#x2F;sqlbolt.com&#x2F;</a> to teach SQL right in the browser in a platform agnostic way.
cheyneover 9 years ago
Been using this library for a while now. Works great, I based my app <a href="https:&#x2F;&#x2F;www.lightroomdashboard.com" rel="nofollow">https:&#x2F;&#x2F;www.lightroomdashboard.com</a> on it
评论 #10202327 未加载
seanalltogetherover 9 years ago
I wonder how well this would work for shipping game assets in the browser. One of the nice things I miss about flash was having a single compiled object to store on the server and distribute to end users which contained all the assets and sounds needed for the game. Stuffing all your assets into a sqlite database and sending that over the wire would keep everything nice and tidy.
评论 #10201157 未加载
inglorover 9 years ago
I wrote an SQL injection tutorial using this a while ago: benjamingr.github.io&#x2F;PizzaHack
PSeitzover 9 years ago
I would be very interested in benchmarks comparing it to the native version
omegoteover 9 years ago
ITT: people advertising their SQL-teaching websites.