Language Specification
The syntax and semantic specification document for the yaoxiang language.
Table of Contents
- Syntax Specification - Lexical structure, grammar rules, operator precedence
- Type System - Primitive types, composite types, generics, trait
- Module System - Module definition, import/export, scope
- FFI Specification -
nativeextensions, C ABI type mapping and opaque types - Concurrency Model - Block semantics, spawn concurrency primitives, error handling, resource types
- Standard Library - Module overview, core library, IO library, math library
Overview
This specification defines the core syntax and semantics of the YaoXiang programming language. It is the authoritative reference for the language, intended for compiler and tool implementers.
Specification Structure
- Syntax Specification: Defines the language's lexical structure, grammar rules, and operator precedence
- Type System: Defines the language's type system, including primitive types, composite types, generics, and trait
- Module System: Defines the language's module system, including module definition, import/export, and scope
- FFI Specification: Defines
native("symbol")declarations,unsafe {}opaque types, and[0]method bindings - Concurrency Model: Defines the language's concurrency model, including spawn primitives and the memory model
- Standard Library: Defines the language's standard library, including the core library, IO library, and math library
Version Information
- Compiler version: Synchronized with the
versionfield inCargo.toml, current - Status: Specification
- Author: Chenxu
This page no longer self-reports a "specification version" — the specification is released alongside the compiler at the same version, and the version number is governed by the
CHANGELOG.mdandCargo.tomlat the repository root, to prevent the two numbers from drifting apart. The module-level API signatures in this directory are derived fromStdModule::exports()and guarded by a gate (see Standard Library Reference).
Related Resources
- Tutorial - Getting started tutorial and example code
- Design Documents - Language design documents
- RFC Documents - Language change proposals
