Languages
Thirty languages, one engine
Release v2.0.0-alpha.20. Servirtium ships native libraries for Linux (glibc and musl), macOS, Windows and FreeBSD, and four packaged artifacts: the Java jar, the .NET nupkg, the npm tarball and the Swift artifact bundle. Nothing is on a language registry. Every other language vendors the binding's source at the release tag and loads the native library from the release. Each page below has the exact steps, copyable record and playback snippets, and a prompt to hand to a coding agent.
Using an agent for a language not listed, or not sure which to pick? Use the general prompt.
| Language | Ships artifact or vendor source | How to install | FFI |
|---|---|---|---|
| Go | Vendor source | No registry package: go get the go/v2 module at the release tag, plus the release native library | cgo |
| Python | Vendor source | No PyPI package (the PyPI name 'servirtium' is the old 1.x): pip install the python/ subdirectory of the tag, plus the release native library | ctypes |
| Java | Ships an artifact | Ships: servirtium-vcr-2.0.0-alpha.20.jar (fat jar, six natives); install into ~/.m2 as dev.servirtium:vcr | Java Foreign Function & Memory API (java.lang.foreign, Project Panama) |
| .NET | Ships an artifact | Ships: Servirtium.Vcr.2.0.0-alpha.20.nupkg (net8.0 + net48, eight RIDs); use the release directory as a local NuGet feed | P/Invoke (NativeLibrary) |
| Rust | Vendor source | No crates.io package: Cargo git dependency on the release tag, plus the release native library | libloading (dlopen) |
| Ruby | Vendor source | No RubyGems package: Bundler git source on the release tag (glob: 'ruby/*.gemspec'), plus the release native library | Fiddle |
| JavaScript and TypeScript | Ships an artifact | Ships: servirtium-vcr-2.0.0-alpha.20.tgz (npm tarball, eight natives bundled: linux x64/arm64 glibc and musl, macOS x64/arm64, Windows x64/arm64) | koffi |
| Dart (and Flutter) | Vendor source | No pub.dev package: pub git dependency on the release tag (path: dart), plus the release native library | dart:ffi |
| PHP | Vendor source | Not on Packagist. Composer path repository onto a checkout of the tag, plus the release native library | PHP FFI (FFI::cdef) |
| Haskell | Vendor source | Not on Hackage. Cabal project against a checkout of the tag, plus the release native library | foreign import ccall (link-time) |
| Elixir | Vendor source | Not on Hex. Mix git dependency (sparse: elixir) plus a NIF app built from the release library by erlang/build-nif-app.sh | shared C NIF (servirtium_nif OTP app) |
| Pharo (Smalltalk) | Vendor source | Load the Tonel sources at the tag with Metacello + the release native library | UnifiedFFI (uFFI) |
| Nim | Vendor source | Vendor the source at the tag (--path) + link the release native library | {.importc.} + {.passL.} link at compile time |
| Zig | Vendor source | Vendor servirtium.zig from the tag + link the release native library in your build.zig | link at build time (addLibraryPath + linkSystemLibrary) |
| Lua (Lua 5.4 C extension) | Vendor source | Two source files at the tag, compiled against the release native library | hand-written Lua 5.4 C extension linked against the library |
| Erlang | Vendor source | Not on Hex. Build servirtium_nif + servirtium_erl from the release library with erlang/build-nif-app.sh | C NIF (servirtium_nif OTP app, owned by this binding) |
| Gleam | Vendor source | Not on Hex. Gleam path dependency onto a checkout of the tag, plus a NIF app built from the release library | @external(erlang, ...) onto the shared servirtium_nif C NIF |
| LFE | Vendor source | Not on Hex. Compile one .lfe file with lfec next to a NIF app built from the release library | shared C NIF (servirtium_nif OTP app), called directly |
| C | Vendor source | Vendor servirtium.h + servirtium.c at the tag, plus the native library from the release | direct link (no FFI) |
| C++ | Vendor source | Vendor servirtium.hpp + servirtium.h + servirtium.c at the tag, plus the native library | header-only RAII over the C client |
| Crystal | Vendor source | Shard from the git tag (github: dependency) + release native library | lib/fun block under @[Link] (direct C ABI, no glue C) |
| D | Vendor source | Clone at the tag (dub add-local or plain dmd -I) + release native library | extern (C) declarations, linked at build time |
| Julia | Vendor source | Pkg.add by git URL at the tag (subdir julia) plus the native library from the release; not in the General registry | ccall |
| Janet | Vendor source | jpm install from git at the tag, plus the native library from the release; not in a Janet registry | built-in FFI (ffi/native) |
| Swift | Ships an artifact | Ships: servirtium-vcr-swift-v2.0.0-alpha.20.artifactbundle.zip, pulled by SwiftPM from: "2.0.0-alpha.20" | clang module map over the C ABI |
| Kotlin | Vendor source | Vendor: install the release jar, then build the Kotlin layer (dev.servirtium:vcr-kotlin) from the tag; the layer is not a release asset | Java binding (no second FFI) |
| Scala | Vendor source | Vendor: install the release jar, then build the Scala layer (dev.servirtium:vcr-scala) from the tag; the layer is not a release asset | Java binding (no second FFI) |
| Clojure | Vendor source | Vendor: install the release jar, then build the Clojure layer (dev.servirtium:vcr-clojure) from the tag; the layer is not a release asset | Java binding (no second FFI) |
| Groovy | Vendor source | Vendor: install the release jar, then build the Groovy layer (dev.servirtium:vcr-groovy) from the tag; the layer is not a release asset | Java binding (no second FFI) |
| F# | Vendor source | Uses the release Servirtium.Vcr.2.0.0-alpha.20.nupkg (no F#-specific package exists); copy the one file Servirtium.fs for the combinators | Servirtium.Vcr (C#) assembly, no second FFI |
Kotlin, Scala, Clojure and Groovy are thin layers over the Java jar; F# is a thin layer over the .NET assembly. The BEAM languages share one NIF. The platforms of the native libraries and the other assets are listed under platforms and release.