An unofficial, read-only Hacker News reader.

Minipg: PostgreSQL as a Single Executable (opens external site)

300 points by rguiscard 3 days ago | progrium.github.io | 47 comments on HN

View full thread · View on Hacker News

Comment thread (4)

  1. For folks working in this area, may I request a MySQL/mariadb-lite?

    pglite is great for browser / testing emulation for PG. MySQL in browser does not have an equally good story. Closest is https://github.com/ephpm/litewire , but it isnt really MySQL fully.

    Replies (2)
    1. There are a couple of very early attempts. lite4mariadb (https://github.com/shyim/lite4mariadb) compiles MariaDB's embedded server (InnoDB) to WASM with a PGlite-style API and IndexedDB persistence, and mysql-wasm (https://github.com/benmerckx/mysql-wasm) does the same for MySQL 9.7.

      Can't recommend it but I experimented myself with lite4mariadb and hit a few rough edges, e.g. transactions aren't isolated when the callback is async, memory use is insane. Issues are also disabled on the repo (it's a github fork), so there's nowhere to report bugs.

      General issue of both is them being single-connection and being less battle tested.

      If translation is acceptable, wordpress playground's sqlite driver (sqlite-database-integration) parses mysql into an ast which is based on my experience is the most proven approach in browser today.

      Would be genuinely excited if mysql in WASM gets more attention.

      Replies (1)
      1. Very cool - thanks for these pointers.
    2. (Disclosure: The project is extremely vibe-coded so please take this or do anything that you want it as you may and I have tried to credit you for the idea! :-D)

      I am not a person who runs Mysql/mariadb-lite but I got curious by this and so I just ended up building the thing out of curiosity because why not: https://github.com/SerJaimeLannister/minimariadb-lite (Some more details[0])

      Running it on web: https://serjaimelannister.github.io/minimariadb-lite/

      Have a nice day!

      [0]: Please note that it was a test on GLM 5.4 as I just wanted to try it and left it running for a day (I have an older account so it just has 5 hour resets and no weekly limits and just let it rip on the problem), some final finishes were done by GPT sol 6.2 (low)