E0021: unsupported capability

View source

meta capability("...") names a native feature that a verb needs from the target.

meta capability("...") names a native feature that a verb needs from the target. The names come from a closed registry in the compiler, such as posix.cloexec, posix.create_exclusive, unix.rename_atomic and windows.replace_file. ADR-0096 says the parser rejects every other name, so a requirement that the compiler cannot check is never accepted. The error points at the string.

Example

actus
meta capability("fly")
verb main() {
}
toml
[package]
name = "example"
version = "0.1.0"
edition = "alpha"
entry = "main"

[build]
target = "x86_64-unknown-linux-gnu"
profile = "debug"
runtime = "std"

Fix

Use a name from the registry.

actus
meta capability("posix.cloexec")
verb main() {
}
toml
[package]
name = "example"
version = "0.1.0"
edition = "alpha"
entry = "main"

[build]
target = "x86_64-unknown-linux-gnu"
profile = "debug"
runtime = "std"

Run actus explain E0021 in your terminal to read this entry offline. Browse Lexer & parser or all error codes.