firnas_lb_wasm
TypeScript icon, indicating that this package has built-in type declarations

0.1.0 • Public • Published

Firnas WASM

WebAssembly bindings for Firnas.

Why?

Browsers are different systems, so they should be treated differently. For example, browsers doesn't have standard IO, so firnas abstracts the stdio then firnas_wasm provides a custom implementation and expose callbacks.

How to use?

npm i firnas_wasm
# or
yarn install firnas_wasm
import init, { compile } from 'firnas_wasm';

init()
    .then(() => {
        let results = [];
        let isLoading = false;
        compile(
            /* code */ code,
            /* on print */ (res) => { results.push(res) },
            /* on start compilation */ () => { isLoading = true; },
            /* on finish execution */ () => {
                console.log(results.join("\n"));
                isLoading = false;
            }
        );
    });

Readme

Keywords

none

Package Sidebar

Install

npm i firnas_lb_wasm

Weekly Downloads

1

Version

0.1.0

License

none

Unpacked Size

166 kB

Total Files

5

Last publish

Collaborators

  • hamzajd