3 ms·
Yes. I would like to use the code as a library from something other than js/ts.
by mpweiher 11mo ago
Yes. I would like to use the code as a library from something other than js/ts.
- monster_truck 11mo agoSo compile it and use it?
- embedding-shape 11mo agoSounds you only need to create the APIs for calling into WASM if so, so as long as your language of choice can do that, you're good to go.
- dboreham 11mo agoThat adds extra unnecessary complexity. The code is written in C. There are C compilers for all CPUs. So just call the C code from <other language that's not JS>.
- hombre_fatal 11mo agoWell, a project has scope. Looking at the repo, it started as postgres-in-the-browser. An abstract interface with C and wasm as targets is just more scope. But it looks like the hard part of patching postgres to librar-ify it is already done agnostically in C. So you just need to ctrl-f for "#if defined(__EMSCRIPTEN__)" to impl those else branches and port the emmake file to make.
- mirrir 11mo agoYou can use it in Rust if you like. I've used pglite through wasmer before. Also [pglite-oxide](https://lib.rs/crates/pglite-oxide https://lib.rs/crates/pglite-oxide) is pretty usable.