liona24
wasm-tetris
Rust

A simple tetris clone using Rust and WebAssembly

Last updated May 13, 2025
79
Stars
5
Forks
9
Issues
0
Stars/day
Attention Score
9
Language breakdown
Rust 74.8%
JavaScript 22.8%
HTML 2.4%
โ–ธ Files click to expand
README

wasm-tetris

A simple tetris clone built using wasm-pack.

Demo available at https://liona24.github.io/wasm-tetris/

Tetris

Preview

Usage

In order to run this demo you will need Rust and wasm-pack along side npm (check the section below).

To build the demo and run it in your browser:

$ wasm-pack build
$ cd www
$ npm install
$ npm run start

Controls are W A S D

The Template Used

About

[๐Ÿ“š Read this template tutorial! ๐Ÿ“š][template-docs]

This template is designed for compiling Rust libraries into WebAssembly and publishing the resulting package to NPM.

Be sure to check out [other wasm-pack tutorials online][tutorials] for other templates and usages of wasm-pack.

[tutorials]: https://rustwasm.github.io/docs/wasm-pack/tutorials/index.html [template-docs]: https://rustwasm.github.io/docs/wasm-pack/tutorials/npm-browser-packages/index.html

๐Ÿšด Usage

๐Ÿ‘ Use cargo generate to Clone this Template

Learn more about cargo generate here.

cargo generate --git https://github.com/rustwasm/wasm-pack-template.git --name my-project
cd my-project

๐Ÿ› ๏ธ Build with wasm-pack build

wasm-pack build

๐Ÿ”ฌ Test in Headless Browsers with wasm-pack test

wasm-pack test --headless --firefox

๐ŸŽ Publish to NPM with wasm-pack publish

wasm-pack publish

๐Ÿ”‹ Batteries Included

between WebAssembly and JavaScript. for logging panic messages to the developer console. for small code size.
๐Ÿ”— More in this category

ยฉ 2026 GitRepoTrend ยท liona24/wasm-tetris ยท Updated daily from GitHub