Language Overview
What CCL focuses on
Section titled “What CCL focuses on”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.
Main building blocks
Section titled “Main building blocks”Global attributes
Section titled “Global attributes”Global attributes affect the whole generation process.
#[CCLVersion("1.0.0")]#[SerializationType("binary")]See Attributes for scopes, language selectors, and supported attribute names.
Models
Section titled “Models”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.
Per-model attributes
Section titled “Per-model attributes”Models can also carry attributes.
[SerializationType("binary")][SerializationType("json")]model GetUsersResult { Users: UserInfo[];}Current scope
Section titled “Current scope”CCL intentionally stays minimal. The current public examples emphasize models and attributes rather than a wide type system.