Skip to content

A WASM package written in C that draws a terminal and outputs it to a canvas.

Notifications You must be signed in to change notification settings

kyelewis/wasm-terminal

Repository files navigation

WASM Terminal

A WASM package written in C that draws a terminal and outputs it to a canvas.

Just created as a simple way for me to learn how to write for WASM in C directly, without using emscripten, and package it in an npm package.

Install

pnpm add @kyedoesdev/wasm-terminal

Usage

import { WASMTerminal } from "@kyedoesdev/wasm-terminal";

(async () => {
  const terminal = new WASMTerminal();
  await terminal.init();
  terminal.setText("abc wasm!!");
  terminal.renderToCanvas("#renderCanvas");
})();

Screenshot

Screenshot of wasm-terminal

Demo

wasm-terminal