4 ms·
Extremely easy interop with native code is the main selling point of guile IMO. You just link in guile as a library and can have C code call scheme code and vic
by School-Cotton 2y ago
Extremely easy interop with native code is the main selling point of guile IMO. You just link in guile as a library and can have C code call scheme code and vice versa. Makes it great for any native program that needs an embedded scripting language (much like Lua). Does Racket support that use-case?
- eru 2y agoI haven't done FFI with Racket, but https://docs.racket-lang.org/foreign/index.html https://docs.racket-lang.org/foreign/index.html looks reasonably approachable?
- School-Cotton 2y agoThat seems to let you call C functions from Racket, but I don't see how it lets you embed Racket in a C program and call Racket functions from C. So it's at best half a solution, unless I'm missing something.
- eru 2y agoSee https://docs.racket-lang.org/inside/cs-procs.html https://docs.racket-lang.org/inside/cs-procs.html