Skip to content

MYRA Codec is a high-performance binary serialization library with a schema-first design. It supports full schema evolution, union types, and zero-copy encoding/decoding paths for maximum throughput.

License

Notifications You must be signed in to change notification settings

mvp-express/myra-codec

Repository files navigation

MyraCodec

Zero-copy serialization with schema-driven code generation for Java's FFM API.

Build License

Installation

For applications using generated flyweights:

dependencies {
    implementation("express.mvp.myra.codec:runtime:0.1.0")
}

For code generation tooling:

dependencies {
    implementation("express.mvp.myra.codec:codegen:0.1.0")
}

Requires Java 24+ with FFM enabled:

java --enable-native-access=ALL-UNNAMED -jar your-app.jar

Quick Example

Define a schema in .myra.yml:

namespace: "com.example"
messages:
  - name: "Order"
    fields:
      - { tag: 1, name: "id", type: "int64" }
      - { tag: 2, name: "symbol", type: "string" }

Generate and use:

./gradlew :codegen:run --args "-s order.myra.yml -o src/generated -l order.myra.lock"
var builder = new OrderBuilder();
builder.wrap(segment).id(123L).symbol("AAPL");

var flyweight = new OrderFlyweight();
flyweight.wrap(segment, 0);
long id = flyweight.id();  // Zero-copy read

Documentation

📚 User Guide — Full documentation
🚀 Getting Started — Ecosystem tutorial
📖 API Reference — Javadoc
📋 Schema Specification.myra.yml format

For Contributors

See CONTRIBUTING.md for build instructions and PR process.

License

Apache 2.0 — See LICENSE

About

MYRA Codec is a high-performance binary serialization library with a schema-first design. It supports full schema evolution, union types, and zero-copy encoding/decoding paths for maximum throughput.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published