Fork me on GitHub
#graalvm
<
2021-03-21
>
chrisn17:03:05

@borkdude - I have an example of compiling avclj into a shared library and building a c++ executable to encode some h264 video. It wasn't too bad but here are caveats like your library export file cannot have reference vars not referenced from your jar's main class. • https://github.com/cnuernber/avclj/blob/master/native_test/avclj/libavclj.cljhttps://github.com/cnuernber/dtype-next/blob/master/src/tech/v3/datatype/ffi/graalvm.clj#L360https://github.com/cnuernber/avclj/blob/master/scripts/compile-shared

chrisn17:03:34

It is pretty damn amazing you can compile Clojure, especially mixed native/JVM clojure like this into a shared library and the thing actually works when called from c++.

aw_yeah 3
blak3mill3r21:03:16

Wow. Now we can build hybrid C++ systems with Clojure as the dynamic language instead of Python or Common Lisp. It just keeps gettin' better!

sb17:03:18

That could be really huge in the future! 👏👏👏

borkdude17:03:28

yeah, that is awesome :) thanks for the examples!

borkdude17:03:08

I think your C FFI stuff might come in handy for building this https://github.com/borkdude/plsci directly as a postgres plugin without the Rust wrapper and do more interesting things

borkdude17:03:39

(not really working on this at the moment, more of a toy project currently)

chrisn17:03:38

I would love to talk about it at some point. A postgres plugin pathway sounds pretty fun 🙂. So amazing where things sit right now; never thought this would be possible.