ProductPromotion
Logo

Go.Lang

made by https://0x3d.site

GitHub - wa-lang/wa: Wa is the best Wasm language
Wa is the best Wasm language. Contribute to wa-lang/wa development by creating an account on GitHub.
Visit Site

GitHub - wa-lang/wa: Wa is the best Wasm language

GitHub - wa-lang/wa: Wa is the best Wasm language

简体中文 | English

Build Status Coverage Status GitHub release license CNCF Landscape

Wa-lang 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-lang is in the engineering trial stage.

Note: Unless otherwise noted, the Wa source files are distributed under the AGPL-v3 license found in the LICENSE file.

How to contribute

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: Submitting a PR to this repository is deemed to be your recognition and acceptance of the Wa-lang Contributor Agreement(Aka WCA), but your PRs will not be reviewed or accepted until WCA is actually signed.

Playground

https://wa-lang.org/playground

Snake Game

WASM4 Game

NES emulator

WebGPU Demo

P5 for creative coding

Arduino Nano 33

Example: Print Wa

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

Example: Print Prime

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 -target=wasi examples/prime
2
3
5
7
11
13
17
19
23
29

Example: Print Prime with Chinese syntax

Print prime numbers up to 30:

引于 "书"

【启】:
  // 输出30以内的素数
  从n=2,到n>30,有n++:
    设素=1
    从i=2,到i*i>n,有i++:
      设x=n%i
      若x==0则:
        素=0
      。
    。
    若素!=0则:
      书·曰:n
    。
  。
。

Output is the same as the previous example.

Example: Chrome Native AI

Chrome builtin Gemini Nano Demo:

import "ai"

func main {
	ai.RequestSession(func(session: ai.Session){
		session.PromptAsync("Who are you?", func(res: string) {
			println(res)
		})
	})
}

More examples waroot/examples

Contributors

Contributor Contribution points
柴树杉 69000
丁尔男 73500
史斌 29000
扈梦明 39000
赵普明 18000
宋汝阳 2000
刘云峰 1000
王湘南 1000
王泽龙 1000
吴烜 3000
刘斌 2500
尹贻浩 2000
安博超 3000
yuqiaoyu 600
qstesiro 200
small_broken_gong 100
tk103331 100
蔡兴 3000
王仁义 1000
imalasong 1000

Give a Star! ⭐

If you like or are using Wa to learn or start your projects, please give it a star. Thanks!

Articles
to learn more about the golang concepts.

Resources
which are currently available to browse on.

mail [email protected] to add your project or resources here 🔥.

FAQ's
to know more about the topic.

mail [email protected] to add your project or resources here 🔥.

Queries
or most google FAQ's about GoLang.

mail [email protected] to add more queries here 🔍.

More Sites
to check out once you're finished browsing here.

0x3d
https://www.0x3d.site/
0x3d is designed for aggregating information.
NodeJS
https://nodejs.0x3d.site/
NodeJS Online Directory
Cross Platform
https://cross-platform.0x3d.site/
Cross Platform Online Directory
Open Source
https://open-source.0x3d.site/
Open Source Online Directory
Analytics
https://analytics.0x3d.site/
Analytics Online Directory
JavaScript
https://javascript.0x3d.site/
JavaScript Online Directory
GoLang
https://golang.0x3d.site/
GoLang Online Directory
Python
https://python.0x3d.site/
Python Online Directory
Swift
https://swift.0x3d.site/
Swift Online Directory
Rust
https://rust.0x3d.site/
Rust Online Directory
Scala
https://scala.0x3d.site/
Scala Online Directory
Ruby
https://ruby.0x3d.site/
Ruby Online Directory
Clojure
https://clojure.0x3d.site/
Clojure Online Directory
Elixir
https://elixir.0x3d.site/
Elixir Online Directory
Elm
https://elm.0x3d.site/
Elm Online Directory
Lua
https://lua.0x3d.site/
Lua Online Directory
C Programming
https://c-programming.0x3d.site/
C Programming Online Directory
C++ Programming
https://cpp-programming.0x3d.site/
C++ Programming Online Directory
R Programming
https://r-programming.0x3d.site/
R Programming Online Directory
Perl
https://perl.0x3d.site/
Perl Online Directory
Java
https://java.0x3d.site/
Java Online Directory
Kotlin
https://kotlin.0x3d.site/
Kotlin Online Directory
PHP
https://php.0x3d.site/
PHP Online Directory
React JS
https://react.0x3d.site/
React JS Online Directory
Angular
https://angular.0x3d.site/
Angular JS Online Directory