3 ms·
OCaml can call external libraries via FFi functionality. I've only done this with Bucklescript (which makes it easy, the JS doesn't need to be compiled) though
by tonyhb 9y ago
OCaml can call external libraries via FFi functionality. I've only done this with Bucklescript (which makes it easy, the JS doesn't need to be compiled) though RWO walks through binding a C library: https://realworldocaml.org/v1/en/html/foreign-function-interface.html https://realworldocaml.org/v1/en/html/foreign-function-inter.... Wonder if this could be used with the go/rust compiler?
- apatil 9y agoIt's definitely possible today, I just wish it were closer to seamless. For example, it seems like it would be possible to write a utility that takes a Go source file and emits a .cma, and maybe an .mli so you can see what's in there.