Wa is a general-purpose programming language designed for developing robustness and maintainability WebAssembly software.
Instead of requiring complex toolchains to set up, you can simply go install it - or run it in a browser.
Note: Our canonical Git repository is located at https://gitee.com/wa-lang/wa. There is a mirror of the repository at https://github.com/wa-lang/wa. Unless otherwise noted, the Wa source files are distributed under the AGPL-v3 license found in the LICENSE file.
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
The Wa Programming Language
简体中文 | English
Wa is a general-purpose programming language designed for developing robustness and maintainability WebAssembly software. Instead of requiring complex toolchains to set up, you can simply go install it - or run it in a browser.
Playground
https://wa-lang.org/playground
Snake Game
Example: Print Wa
Print rune and call function:
Execute the program:
Example: Print Prime
Print prime numbers up to 30:
Execute the program:
Example: Print Prime with Chinese syntax
Print prime numbers up to 30:
Output is the same as the previous example.
More examples waroot/examples
Contributors