Re:Beware of Bun.js
by undefined_void on Friday October 14, 2022 @01:25AM
(#33199951)
Thank you for the comment. I'll update the gist with this.
Bun's SQLite implementation has correctness issues:
https://github.com/oven-sh/bun/issues/921
https://github.com/oven-sh/bun/pull/1056#pullrequestreview-1...
This makes SQLite transactions no longer serializable (in regard to the schema), and breaks the safety of any kind of external concurrency (e.g. mvSQLite and Litestream).
Regarding the SQLite claim:
The "view source" link for SQLite is out of date (fixing shortly), but the numbers are correct. I forgot to change the label on the landing page from "x/sqlite" to "x/sqlite3" and I forgot to update the source link.
You can see I updated in this git commit:
https://github.com/oven-sh/bun/commit/4b5c9acc72908ba22e3f70...
Here is what it shows for me, but I encourage you to run it on your own computer to see for yourself:
Regarding the FFI benchmark, you can see the commit from today here:https://github.com/oven-sh/bun/commit/40506e33e73018103bcf08...
It threw an error until I googled "Deno pointer ffi", which mentioned this function https://doc.deno.land/deno/unstable/~/Deno.UnsafePointer and that worked. I assumed that `Deno.UnsafePointer.of` is the expected way to get a pointer to a buffer, but it seems that changing the type to "buffer" is a faster way for this case. Will update the page shortly.