Skip to content

SharedType/sharedtype

Repository files navigation

CI

SharedType - Sharing Java Types made easy

From Java:

@SharedType
record User(String name, int age, String email) {}

To Typescript:

export interface User {
    name: string;
    age: number;
    email: string;
}

Go (Planed):

type User struct {
    Name string
    Age int
    Email string
}

Rust (Planed):

struct User {
    name: String,
    age: i32,
    email: String,
}

And more.

Features

  • Java8 support. No hassles.
  • Generics support.
  • (Planed) Constant support.
  • Client source dependency is only @SharedType. Nothing gets into bytecode/runtime.
  • SharedType AP jars <100KB, only 2 small dependencies: jsr305 annotations and mustache. Download less.
  • Parsing takes milliseconds with -proc:only. Implemented with performance in head.
  • Intuitive defaults, put @SharedType and there you go.
  • Global + class level options. Fine tune your configs.

Similar Projects

Documentation

Authors

Cause Chung (cuzfrog@gmail.com)

License

CC BY 4.0 CC BY 4.0