凹语言, The Wa Programming Language
See the codeWa (Chinese name "凹", which pronounced "Wa") is a general-purpose programming language designed for for WebAssembly. The goal is to provide a simple, reliable, easy-to-use, statically typed language for high-performance web applications. The code generator and runtime are fully independently developed (not dependent on external projects such as LLVM). Currently, Wa is in the engineering trial stage.
Note: The Wa compiler source files are distributed under the AGPL-v3 license. The Wa standard library is licensed under the MIT license. The programs you develop using the Wa language can be safely used commercially without open source. If you want to integrate the Wa compiler code into your own project, but do not want to be restricted by the infectiousness of AGPL-v3, you can contact us to customize the license agreement for you.
The project is still in the prototype stage. If you have co-construction or PR needs, please refer to How to contribute. We no longer accept PRs for modifications to third-party libraries.
Note: Our canonical Git repository is located at https://gitcode.com/wa-lang/wa. There is a mirror of the repository at https://github.com/wa-lang/wa.
Note: Submitting a PR to this repository is deemed to be your recognition and acceptance of the Wa Contributor Agreement(Aka WCA), but your PRs will not be reviewed or accepted until WCA is actually signed.
Wa is designed with a dual-frontend system (supporting both Chinese and English syntax) that interfaces with a unified Intermediate Representation (Wa-lang IR). The backend connects to proprietary Chinese/English assemblers, targeting various Instruction Set Architectures (ISA). This design achieves a fully self-developed toolchain without external dependencies such as GCC or LLVM.
graph LR
wa_ext(Wa English.wa);
wz_ext(Wa Chinese.wz);
wa_ast(Wa English AST);
wz_ast(Wa Chinese AST);
wair(Wa-IR);
wasm(WASM);
nasm(Wa Native Assembler);
c_cpp(C/C++);
x64(X64);
loong64(LoongArch);
riscv(RISCV);
arm64(ARM64);
wa_ext --> wa_ast;
wz_ext --> wz_ast;
wa_ast --> wair;
wz_ast --> wair;
wair --> wasm
wair --> nasm
wair --> c_cpp
nasm --> loong64
nasm --> x64
nasm --> riscv
nasm --> arm64
https://wa-lang.org/playground







Print string and call function:
注: 你好,世界!
引入 "书"
函数·主控:
书·说("你好,凹语言中文版!")
完毕
Execute the program:
$ wa run hello.wz
你好,凹语言中文版!
Print rune and call function:
import "fmt"
global year: i32 = 2023
func main {
println("hello, Wa!")
println(add(40, 2), year)
fmt.Println(1+1)
}
func add(a: i32, b: i32) => i32 {
return a+b
}
Execute the program:
$ wa run hello.wa
hello, Wa!
42 2023
2
Print prime numbers up to 30:
func main {
for n := 2; n <= 30; n = n + 1 {
isPrime: int = 1
for i := 2; i*i <= n; i = i + 1 {
if x := n % i; x == 0 {
isPrime = 0
}
}
if isPrime != 0 {
println(n)
}
}
}
Execute the program:
$ cd waroot && wa run examples/prime
2
3
5
7
11
13
17
19
23
29
More examples waroot/examples
| Contributor | Contribution points |
|---|---|
| 柴树杉 | 124650 |
| 丁尔男 | 116650 |
| 史斌 | 10000 |
| 扈梦明 | 72500 |
| 赵普明 | 10000 |
| 宋汝阳 | 2000 |
| 刘云峰 | 1000 |
| 王潇南 | 1000 |
| 王泽龙 | 1000 |
| 吴烜 | 3000 |
| 刘斌 | 2500 |
| 尹贻浩 | 2000 |
| 安博超 | 3000 |
| yuqiaoyu | 600 |
| qstesiro | 200 |
| small_broken_gong | 100 |
| tk103331 | 100 |
| 蔡兴 | 3000 |
| 王任义 | 1000 |
| imalasong | 2000 |
| 杨刚 | 4000 |
| 崔爽 | 2000 |
| 李瑾 | 20000 |
| 王委委 | 100 |
| 雪碧 | 100 |
Email: dev{AT}wa-lang.org
624 followers · starred Jul 2022
1,136 followers · starred Dec 2025
45 followers · starred Jul 2025
171 followers · starred Jul 2022
凹语言, The Wa Programming Language
See the codeWa (Chinese name "凹", which pronounced "Wa") is a general-purpose programming language designed for for WebAssembly. The goal is to provide a simple, reliable, easy-to-use, statically typed language for high-performance web applications. The code generator and runtime are fully independently developed (not dependent on external projects such as LLVM). Currently, Wa is in the engineering trial stage.
Note: The Wa compiler source files are distributed under the AGPL-v3 license. The Wa standard library is licensed under the MIT license. The programs you develop using the Wa language can be safely used commercially without open source. If you want to integrate the Wa compiler code into your own project, but do not want to be restricted by the infectiousness of AGPL-v3, you can contact us to customize the license agreement for you.
The project is still in the prototype stage. If you have co-construction or PR needs, please refer to How to contribute. We no longer accept PRs for modifications to third-party libraries.
Note: Our canonical Git repository is located at https://gitcode.com/wa-lang/wa. There is a mirror of the repository at https://github.com/wa-lang/wa.
Note: Submitting a PR to this repository is deemed to be your recognition and acceptance of the Wa Contributor Agreement(Aka WCA), but your PRs will not be reviewed or accepted until WCA is actually signed.
Wa is designed with a dual-frontend system (supporting both Chinese and English syntax) that interfaces with a unified Intermediate Representation (Wa-lang IR). The backend connects to proprietary Chinese/English assemblers, targeting various Instruction Set Architectures (ISA). This design achieves a fully self-developed toolchain without external dependencies such as GCC or LLVM.
graph LR
wa_ext(Wa English.wa);
wz_ext(Wa Chinese.wz);
wa_ast(Wa English AST);
wz_ast(Wa Chinese AST);
wair(Wa-IR);
wasm(WASM);
nasm(Wa Native Assembler);
c_cpp(C/C++);
x64(X64);
loong64(LoongArch);
riscv(RISCV);
arm64(ARM64);
wa_ext --> wa_ast;
wz_ext --> wz_ast;
wa_ast --> wair;
wz_ast --> wair;
wair --> wasm
wair --> nasm
wair --> c_cpp
nasm --> loong64
nasm --> x64
nasm --> riscv
nasm --> arm64
https://wa-lang.org/playground







Print string and call function:
注: 你好,世界!
引入 "书"
函数·主控:
书·说("你好,凹语言中文版!")
完毕
Execute the program:
$ wa run hello.wz
你好,凹语言中文版!
Print rune and call function:
import "fmt"
global year: i32 = 2023
func main {
println("hello, Wa!")
println(add(40, 2), year)
fmt.Println(1+1)
}
func add(a: i32, b: i32) => i32 {
return a+b
}
Execute the program:
$ wa run hello.wa
hello, Wa!
42 2023
2
Print prime numbers up to 30:
func main {
for n := 2; n <= 30; n = n + 1 {
isPrime: int = 1
for i := 2; i*i <= n; i = i + 1 {
if x := n % i; x == 0 {
isPrime = 0
}
}
if isPrime != 0 {
println(n)
}
}
}
Execute the program:
$ cd waroot && wa run examples/prime
2
3
5
7
11
13
17
19
23
29
More examples waroot/examples
| Contributor | Contribution points |
|---|---|
| 柴树杉 | 124650 |
| 丁尔男 | 116650 |
| 史斌 | 10000 |
| 扈梦明 | 72500 |
| 赵普明 | 10000 |
| 宋汝阳 | 2000 |
| 刘云峰 | 1000 |
| 王潇南 | 1000 |
| 王泽龙 | 1000 |
| 吴烜 | 3000 |
| 刘斌 | 2500 |
| 尹贻浩 | 2000 |
| 安博超 | 3000 |
| yuqiaoyu | 600 |
| qstesiro | 200 |
| small_broken_gong | 100 |
| tk103331 | 100 |
| 蔡兴 | 3000 |
| 王任义 | 1000 |
| imalasong | 2000 |
| 杨刚 | 4000 |
| 崔爽 | 2000 |
| 李瑾 | 20000 |
| 王委委 | 100 |
| 雪碧 | 100 |
Email: dev{AT}wa-lang.org
624 followers · starred Jul 2022
1,136 followers · starred Dec 2025
45 followers · starred Jul 2025
171 followers · starred Jul 2022