Blocks
A named group of fields that can also nest other blocks; the schema sets its labels and fields.
A block is a named group of fields that also lets you nest other blocks under it. The available fields and labels are set by the block schema. A block kind may also be namespace-qualified (wdoc::process { ... }).
wcl
// One label -> name = "web".
service "web" {
port = 8080u32
region = "us-east-1"
}
Multiple labels work the same way — declare an @inline for each position you want to expose:
wcl
// Two labels -> verb = "GET", path = "/users".
route "GET" "/users" {
handler = "list_users"
}
§ 1Nested blocks
Blocks can hold further blocks. Nesting depth is unbounded; structure is constrained by the schema (@child for one, @children for many).
wcl
service "web" {
metadata {
region = "us-east-1"
tags {
environment = "prod"
}
}
}