Sometimes, we want to call an FFI function that is CPU-bound. This would block the main thread. For example, in this sleep_and_scream method from Rust, we use std::thread::sleep to hang the function…
From version 1.13, Deno introduced the FFI API (foreign function interface API) that allows us to load libraries built in any language that supports the C ABI (like C/C++, Rust, Zig, Kotlin,…). To…