> add LLVM CFI and cross-language LLVM CFI (and LLVM KCFI and cross-language LLVM KCFI) to the Rust compiler as part of our work in the Rust Exploit Mitigations Project Group. This is the first cross-language, fine-grained, forward-edge control flow protection implementation for mixed-language binaries that we know of.
Reminder that the #programming languages useful for #applications may not be the same as those used for #libraries that the applications use, and this is just fine, e.g. performance often requires that one does not rediscover the wheel by recoding libraries in #clang#cplusplus and #fortran because they are, for whatever reason , resistant to use a proper #ffi (or an #IPC) #api.
how in the world am I supposed to be "detail oriented" when every job ad is just 9 pages of waffle about how the company is driving the world to be green by ... running an interpreted language in a container in a k8s on a vm on amazon in 4 sites for redundancy
@EndlessMason Almost every “safe” language has some kind of foreign function interface where guarantees break down. #Java has JNI, Microsoft .NET has P/Invoke, and #Rust just calls theirs #FFI.
Perl’s XS is a glue language mostly made up of #C macros that lets you wire up Perl’s guts to C code. There are also alternatives like #SWIG and FFI::Platypus, the latter of which uses a separate portable library (written in C, natch) that can talk to lots of calling conventions, not just C.
@EndlessMason#FFI works with either static or dynamic linking. #Perl and many other language toolchains default to the latter, but you can still built a big statically linked binary if you’re so inclined.
In contrast, #GoLang (for example) defaults to static linking that includes the runtime along with your code in one executable. It does have a cgo feature that lets you call #C code by building and compiling C glue code with your C compiler and then linking it with your #Go.
UniFFI can generate bindings for Rust async functions/methods to Python, Swift and Kotlin, with native async runtimes (resp. asyncio, Task and suspend).
That’s really exciting! Rust Future being driven by a foreign language async runtime, that’s pure fun.