All Projects → AssemblyScript → examples

AssemblyScript / examples

Licence: MIT license
A collection of AssemblyScript examples.

Programming Languages

WebAssembly
147 projects
typescript
32286 projects
HTML
75241 projects
javascript
184084 projects - #8 most used programming language
rust
11053 projects

Projects that are alternatives of or similar to examples

pallet-contracts-waterfall
Collection of simple Substrate smart contract examples written in Rust, AssemblyScript, Solang and the smart contract language ink! to test substrates pallet-contracts module
Stars: ✭ 28 (-87.98%)
Mutual labels:  assemblyscript
assemblyscript-json
JSON encoder / decoder for AssemblyScript
Stars: ✭ 140 (-39.91%)
Mutual labels:  assemblyscript
counter
Increment and decrement a counter with this simple smart contract via a web page.
Stars: ✭ 21 (-90.99%)
Mutual labels:  assemblyscript
atari2600-wasm
An Atari 2600 emulator written in AssemblyScript compiled to WebAssembly
Stars: ✭ 50 (-78.54%)
Mutual labels:  assemblyscript
ask
Ask! is a framework to write Wasm smart contracts for Substrate Frame Pallet-Contracts in AssemblyScript
Stars: ✭ 44 (-81.12%)
Mutual labels:  assemblyscript
guest-book
Sign in with NEAR and add a message to the guest book!
Stars: ✭ 68 (-70.82%)
Mutual labels:  assemblyscript
assemblyscript-regex
A regex engine for AssemblyScript
Stars: ✭ 81 (-65.24%)
Mutual labels:  assemblyscript
Assemblyscript
A TypeScript-like language for WebAssembly.
Stars: ✭ 13,152 (+5544.64%)
Mutual labels:  assemblyscript
rabin-wasm
Rabin fingerprinting implemented in WASM
Stars: ✭ 26 (-88.84%)
Mutual labels:  assemblyscript
Babylon.Font
Generate text mesh for BabylonJS using WASM, written in AssemblyScript.
Stars: ✭ 22 (-90.56%)
Mutual labels:  assemblyscript
website
AssemblyScript's website and documentation.
Stars: ✭ 47 (-79.83%)
Mutual labels:  assemblyscript
as-bignum
Fixed length big numbers for AssemblyScript 🚀
Stars: ✭ 49 (-78.97%)
Mutual labels:  assemblyscript
as-sha256
AssemblyScript implementation of SHA256
Stars: ✭ 15 (-93.56%)
Mutual labels:  assemblyscript
wasm4
Build retro games using WebAssembly for a fantasy console.
Stars: ✭ 711 (+205.15%)
Mutual labels:  assemblyscript
Lucet
Lucet, the Sandboxing WebAssembly Compiler.
Stars: ✭ 4,006 (+1619.31%)
Mutual labels:  assemblyscript
easegress-assemblyscript-sdk
AssemblyScript SDK for Easegress
Stars: ✭ 15 (-93.56%)
Mutual labels:  assemblyscript
gomoku-wasm
A Gomoku game implements with WebAssembly
Stars: ✭ 30 (-87.12%)
Mutual labels:  assemblyscript
blurhash-as
Blurhash implementation in AssemblyScript
Stars: ✭ 26 (-88.84%)
Mutual labels:  assemblyscript
Lunatic
Lunatic is an Erlang-inspired runtime for WebAssembly
Stars: ✭ 2,074 (+790.13%)
Mutual labels:  assemblyscript
redstone-smartcontracts
An implementation of the Arweave SmartWeave smart contracts protocol.
Stars: ✭ 42 (-81.97%)
Mutual labels:  assemblyscript

AssemblyScript Examples

Actions Status

Instructions

This repository contains one example per directory. All examples can be obtained by cloning the repository:

$> git clone https://github.com/AssemblyScript/examples.git
$> cd examples

Afterwards, select the example you'd like to run and follow the instructions in its README file.

Low-level perspective

The following examples make use of AssemblyScript's low-level capabilities, i.e. to essentially write WebAssembly with a nicer syntax.

  • Conway's Game Of Life (demo)
    An implementation of the game of life with slight modifications. Updates an image buffer in memory, that is then presented on a canvas.

  • Mandelbrot Set (demo)
    Computes 2048 offsets of a color gradient in memory, line by line, and presents the set using the gradient's actual colors, as computed on the JavaScript side, on a canvas.

  • Interference effect (demo)
    Colin Eberhardt's and Ben Smith's WebAssembly interference effect, if it was written in AssemblyScript.

High-level perspective

These examples cover slightly higher level aspects, like working with managed objects or interfacing with them.

  • N-body system (demo)
    This is actually a benchmark - visualizing it just so happened.

  • Loader
    Utilizes the loader to perform various common tasks on the WebAssembly/JavaScript boundary, like passing along strings and arrays between both worlds.

Libraries

Various WebAssembly or AssemblyScript features as a library.

  • i64
    Exposes WebAssembly's i64 operations to JavaScript using 32-bit integers (low and high bits).

  • libm
    Exposes AssemblyScript's math routines for double and single precision as a library.

Features

General examples showing how to utilize specific AssemblyScript features.

  • Browser SDK (demo)
    Shows how to use the browser SDK to run the AssemblyScript compiler in the browser.

  • Compiler transforms
    An example of using compiler transforms to hook into the compilation process.

Additional resources

  • Wasm By Example
    A concise, hands-on introduction to WebAssembly using code snippets and annotated example programs. If you "learn best by doing", or just need a good starting point for a concept, this is the place for you.

  • Built with AssemblyScript
    A list of more sophisticated open source projects using AssemblyScript.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].