Skip to content

twilic/twilic-elixir

Repository files navigation

Twilic (Elixir)

Elixir implementation of the Twilic wire format and session-aware encoder/decoder.

This library's default encode / decode API targets Twilic v2.

What this library provides

  • Dynamic encoding/decoding (encode, decode)
  • Schema-aware encoding (encode_with_schema)
  • Batch encoding (encode_batch, SessionEncoder)
  • Native modules under lib/twilic/

Project layout

twilic-elixir/
  lib/twilic/             # wire, model, codec, session, protocol, v2
  test/
  docs/

Requirements

  • Elixir 1.19+ and OTP 27+

Install

def deps do
  [
    {:twilic, git: "https://github.com/twilic/twilic-elixir.git"}
  ]
end

Quick start

value =
  Twilic.new_map([
    Twilic.entry("id", Twilic.new_u64(1001)),
    Twilic.entry("name", Twilic.new_string("alice")),
  ])

encoded = Twilic.encode(value)
decoded = Twilic.decode(encoded)

Development

mix deps.get
mix test

Markdown formatting

See docs/CONTRIBUTING.md.

CI (GitHub Actions)

  • .github/workflows/ci.ymlmix test and markdown checks

Spec parity

Mirrors twilic/twilic; ported from twilic-dart.

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

Elixir implementation of a fast, compact binary wire format for modern data transport.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors