Skip to content

A composable transpiler infrastructure for working with statically typed JavaScript and WebAssembly

License

Notifications You must be signed in to change notification settings

ollelauribostrom/esmbly

 
 

Repository files navigation


A composable transpiler infrastructure for working with statically typed JavaScript and WebAssembly.



Introduction

Esmbly is all about statically typed JavaScript. The goal is to:

  • Be a useful tool for migrating between (and working with) different type systems.
  • Explore different ways of collecting, transforming and utilizing type information in the JavaScript ecosystem.
  • Lower the barrier for JavaScript developers that want to start experimenting and prototyping with WebAssembly by taking advantage of already existing type information in a code base.

Use cases

  • Transform a code base from Flow to TypeScript
  • Turn your tests into types - generate TypeScript based on type information collected during test runs using the V8 profiler.
  • Migrate from JSDoc to TypeScript - generate TypeScript based on your JSDoc comments.
  • Use type information (Flow, TypeScript, JSDoc, V8) to output WebAssembly, Wat, Asm.js and AssemblyScript.

Transformers

Esmbly is built around the concept of transformers. A transformer is responsible for transforming code from one type system to another (like for instance transforming Flow to TypeScript).

Esmbly is designed to be composable, meaning that you can chain multiple transformers to compose your own chain of transformations (as long as their input/output formats are compatible). For example, try chaining @esmbly/transformer-flow and @esmbly/transformer-wasm to turn your Flow code into a WebAssembly binary.

Supported transformers

Getting started

Read the Getting started guide for instructions on how to get started using Esmbly.

Try

Try it out in the Esmbly version of WebAssembly Studio!

Demo

From JSDoc to TypeScript, Wat and WebAssembly in 15 seconds.

Guides

Examples

Contributing

All types of contributions are very much welcome. Check out our Contributing Guide for instructions on how to get started.

About

A composable transpiler infrastructure for working with statically typed JavaScript and WebAssembly

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 94.8%
  • JavaScript 5.1%
  • Shell 0.1%