There's now `call_blocking` and `call_async` to call a JavaScript function from Rust from normal and async call sites
This is no longer the case. While it does not currently provide a stable API, that functionality exists in the deno_runtime crate and is relatively easy to reuse.
Also using ops within Workers is challenging, particularly if they share state.
The CLI only depends on them transitively via deno_runtime: https://github.com/denoland/deno/blob/main/cli/Cargo.toml
For instance I was able to run the following script using just deno_runtime with https://github.com/lrowe/deno_varnish/blob/main/src/main.rs
import { DatabaseSync } from "node:sqlite";
console.log(new DatabaseSync(":memory:").prepare("SELECT 1").get());
01HNNWZ0MV43FF•5mo ago
apatheticonion•4mo ago
The public API should remain the same, as will the extensions, so swapping out backends is an interesting idea to explore