Mode:
Duration:
1
2
3
4
# assemblyscript/demo/add.ts
export function add(a: i32, b: i32): i32 {
return a + b;
}Coding works best on desktop or with an external keyboard.
# assemblyscript/demo/add.ts
export function add(a: i32, b: i32): i32 {
return a + b;
}Coding works best on desktop or with an external keyboard.
A basic AssemblyScript function that adds two numbers and returns the result.
# assemblyscript/demo/add.ts
export function add(a: i32, b: i32): i32 {
return a + b;
}AssemblyScript is a TypeScript-like language that compiles to WebAssembly (Wasm). It allows developers familiar with TypeScript/JavaScript to write high-performance WebAssembly modules for web, server, and blockchain applications.
Origin & Creator
AssemblyScript is an open-source project maintained by the AssemblyScript community, started around 2017.
Industrial Note
AssemblyScript is ideal for web developers seeking performance-critical modules, blockchain developers building smart contracts on Wasm chains, and projects that need a bridge between TypeScript and WebAssembly.