Deno support
Would it be possible to create a deno port? This might be useful: https://dev.to/craigmorten/guide-to-porting-node-modules-to-deno-41cd
I'd love to. The javascript code should mostly work without issue. The problem is porting the native bindings to deno.
It looks like deno has merged a patch to support native plugins but I can't find any documentation on it. We're blocked by this trifecta:
- Foundationdb doesn't have a published network protocol. If it did, we could write a fdb client in plain javascript and run that in deno.
- FDB's native client library doesn't support wasm. If it did, we could compile the fdb client API to wasm and include that from nodejs and deno. (And then we wouldn't need separate builds for windows/mac/linux/freebsd/etc.
- As far as I can tell, deno has no support for napi (node's native module API). If it did, the current native code could be imported and used as-is from deno.
Generally making noise about 1 and 2 in the fdb forums would be helpful if you want to get the ball rolling. Or doing the work yourself - I don't know enough about wasm-ir to port the pure assembly parts of the fdb client codebase to wasm.
If deno has its own native plugin API, maybe we can make an alternate version of the native code specifically for deno. But porting the native code to a different API will be a lot of work.
Can't this be done using FFI?
https://github.com/roj1512/foundationdb_deno might be interesting. I’ve recently worked on it.