Skip to content

Language Overview

CCL is not trying to be a general-purpose language. Its job is much narrower:

  • Define data models in one place.
  • Attach generation or serialization-related attributes explicitly.
  • Generate equivalent code for target languages.

Global attributes affect the whole generation process.

#[CCLVersion("1.0.0")]
#[SerializationType("binary")]

See Attributes for scopes, language selectors, and supported attribute names.

Models define the data shape.

model UserInfo {
Id: int64;
Username: string;
Email: string;
CreatedAt: datetime;
}

Enums define named integer choices that can be used as field types.

enum UserType : uint8 {
Unknown,
Player,
Admin,
}
model UserInfo {
Type: UserType = UserType.Player;
}

See Enums for base types, explicit values, and nested model enums.

Models can also carry attributes.

[SerializationType("binary")]
[SerializationType("json")]
model GetUsersResult {
Users: UserInfo[];
}

CCL intentionally stays minimal. The current public examples emphasize models and attributes rather than a wide type system.