typescript-types-only-wasm-runtime  by MichiganTypeScript

WebAssembly runtime in TypeScript types

created 1 year ago
2,304 stars

Top 20.2% on sourcepulse

GitHubView on GitHub
Project Summary

This project provides a WebAssembly runtime implemented entirely in TypeScript types, enabling the execution of WebAssembly binaries without JavaScript. It targets developers interested in exploring the theoretical limits of type-level computation and demonstrating novel applications of TypeScript's type system, famously running a version of Doom.

How It Works

The runtime leverages TypeScript's type system to represent and execute WebAssembly instructions. Each instruction is translated into a corresponding type-level operation, processing data and control flow purely through type manipulations. This approach allows for the compilation of WebAssembly code into type definitions, effectively running computations at the type level.

Quick Start & Requirements

  • Install: No explicit installation is required beyond a TypeScript environment.
  • Prerequisites: A TypeScript compiler (e.g., tsc) is necessary. The project's complexity suggests a modern TypeScript version (e.g., 4.0+).
  • Demo: The README links to a YouTube video demonstrating Doom running via the runtime.

Highlighted Details

  • Implements a significant subset of WebAssembly instructions, including arithmetic, control flow, memory access, and type conversions.
  • Includes "synthetic" instructions for convenience, not present in the official WebAssembly specification.
  • Features conformance tests comparing outputs against the standard JavaScript WebAssembly runtime.
  • Demonstrates the execution of the Doom game, showcasing the runtime's capabilities.

Maintenance & Community

The project is primarily maintained by @dimitropoulos. The author expresses no intention for further development but is open to discussions and potential handover for future enhancements. Community interaction is encouraged via the MiTS Discord server's #doom channel.

Licensing & Compatibility

The README does not explicitly state a license. Given the nature of the project and its author's commentary, commercial use or integration into closed-source projects may require clarification.

Limitations & Caveats

The project is described as an "active crime scene" with no emotional attachment from the author, indicating it is not intended for robust production use. The author explicitly discourages PRs and has ceased active development, though they are open to consultation for future work.

Health Check
Last commit

4 months ago

Responsiveness

1 week

Pull Requests (30d)
0
Issues (30d)
0
Star History
60 stars in the last 90 days

Explore Similar Projects

Starred by Chip Huyen Chip Huyen(Author of AI Engineering, Designing Machine Learning Systems), Travis Fischer Travis Fischer(Founder of Agentic), and
3 more.

TypeChat by microsoft

0.1%
9k
Library for building natural language interfaces using types
created 2 years ago
updated 1 month ago
Feedback? Help us improve.