GithubHelp home page GithubHelp logo

happy-ferret / assemblyscript Goto Github PK

View Code? Open in Web Editor NEW

This project forked from assemblyscript/assemblyscript

0.0 2.0 0.0 887 KB

A TypeScript to WebAssembly compiler.

Home Page: http://assemblyscript.org

License: Apache License 2.0

JavaScript 2.79% TypeScript 61.04% WebAssembly 36.18%

assemblyscript's Introduction

AssemblyScript NEXT

Build Status

AssemblyScript is a new compiler targeting WebAssembly while utilizing TypeScript's syntax and node's vibrant ecosystem. Instead of requiring complex toolchains to set up, you can simply npm install it - or run it in a browser.

Note, though, that this version of the compiler (0.5.0, NEXT) is relatively new and does not yet support some features a TypeScript programmer might expect, e.g., strings, arrays and classes.

See the AssemblyScript wiki for additional information and documentation.

How does it work?

By compiling syntactially (not necessarily semantically) valid TypeScript to Binaryen IR, the resulting module can be validated, optimized, emitted in WebAssembly text or binary format and converted to asm.js as a polyfill.

Examples

A few early examples to get an idea:

Getting started

This version of the compiler is not on npm, yet, but if you'd like to try it today or even plan to contribute, this is how you do it:

$> git clone https://github.com/AssemblyScript/assemblyscript.git
$> cd assemblyscript
$> npm install

Author your module using either

and run:

$> node bin/asc yourModule.ts

Building

Building an UMD bundle to dist/assemblyscript.js (does not bundle binaryen.js which remains an external dependency):

$> npm run build

Running the tests:

$> npm test

assemblyscript's People

Contributors

dcodeio avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.