Skip to content

SDKs

Twilic has production-ready implementations in eighteen languages. All SDKs target the v2 wire format and share a consistent API surface.

Available SDKs

LanguagePackageRequirements
Rusttwilic (crates.io)Rust stable (edition 2024)
Gogithub.com/twilic/twilic-goGo 1.22+
Pythontwilic (PyPI)Python 3.12+
JavaScript / TypeScript@twilic/coreNode.js 24+ / WASM
Javaio.twilicJava 21+
Scalaio.twilic (GitHub)Java 21+ / Scala 3.3+
Rubytwilic (RubyGems)Ruby 3.3+
Rtwilic (GitHub)R 4.4+
Zigtwilic (build.zig.zon)Zig 0.15.2+
PHPtwilic/twilic (GitHub)PHP 8.3+
Kotlinio.twilic:twilic (GitHub)JDK 21+
Darttwilic (GitHub)Dart SDK 3.5+
Elixir:twilic (GitHub)Elixir 1.19+ / OTP 27+
Luatwilic (GitHub / LuaRocks)Lua 5.4
Ctwilic-c (GitHub)CMake 3.16+ / C11
C++twilic-cpp (GitHub)CMake 3.16+ / C++17
C#Twilic (GitHub).NET 8 SDK
SwiftTwilic (SPM)Swift 5.9+

Common API Surface

All SDKs expose the same logical operations:

OperationDescription
encode(value)Encode a value to Twilic v2 bytes (Dynamic Profile)
decode(bytes)Decode Twilic v2 bytes to a value
encode_with_schema(value, schema)Encode using Bound Profile
encode_batch(records)Encode a batch of same-shape records
SessionEncoderStateful encoder for long-lived streams

Rust (Reference Implementation)

The JavaScript SDK is built on top of the Rust implementation via N-API (Node.js) and WASM (browser/JS runtimes). The Rust crate is the canonical reference implementation for performance and correctness.

Interoperability

All SDKs are tested against a shared set of Rust-generated binary fixtures. Interoperability tests validate that encode output from one SDK is correctly decoded by every other SDK.

Released under the CC-BY-4.0 License.