Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/michareiser/speedy.js-saas

Speedy.js compiler as a service
https://github.com/michareiser/speedy.js-saas

compiler saas speedyjs

Last synced: 15 days ago
JSON representation

Speedy.js compiler as a service

Awesome Lists containing this project

README

        

# Speedy.js as a Service

Heroku Service for compiling TypeScript files to WebAssembly.

## Compile Request

Post your files to `https://speedyjs-saas.herokuapp.com/compile`

```json
{
"files": [
{
"fileName": "fib.ts",
"source": "async function test(value: int) { \"use speedyjs\";\n return value; }"
}
],
"tsconfig": {
"saveWast": true
}
}

```

The output differs depending on the specified tsconfig and [speedy.js options](https://github.com/MichaReiser/speedy.js/blob/master/packages/compiler/src/speedyjs-compiler-options.ts#L10).

```json
[
{
"fileName": "fib.ts",
"sourceMapText": "...",
"wasm": [23, 45 ],
"wast": "(module\n (type $0 ...",
"js": "var __awaiter = ...\n",
"exitStatus": 0,
"diagnostics": []
}
]
```

The schema for the request is located [here](./schemas/compile-schema.json).

## Publish to Heroku

Run `git push heroku master` to push the local version to heroku.