https://github.com/manetu/javascript-lambda-compiler
A compiler for Manetu Lambda Functions written in Javascript
https://github.com/manetu/javascript-lambda-compiler
Last synced: 3 months ago
JSON representation
A compiler for Manetu Lambda Functions written in Javascript
- Host: GitHub
- URL: https://github.com/manetu/javascript-lambda-compiler
- Owner: manetu
- License: apache-2.0
- Created: 2024-03-25T18:38:41.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2024-03-27T12:30:09.000Z (almost 2 years ago)
- Last Synced: 2025-02-02T00:11:18.403Z (11 months ago)
- Language: Rust
- Size: 37.1 KB
- Stars: 0
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Manetu Javascript Compiler (mjsc) for Lambda Functions
This project implements a Javascript to WebAssembly compiler for writing Lambda functions for the Manetu platform in Javascript and Javascript-based languages (e.g., Typescript, Clojurescript, etc.). It is based on [Javy](https://github.com/bytecodealliance/javy), following the [Extending Javy](https://github.com/bytecodealliance/javy/blob/main/docs/extending.md) guidelines.
## Runtime requirements
When running the official mjsc binary on Linux, `glibc` 2.31 or greater must be available. If you are using an older version of `glibc,` you may need to update your operating system.
## Requirements to build
- On Ubuntu, `sudo apt-get install curl pkg-config libssl-dev clang`
- [rustup](https://rustup.rs/)
- Stable Rust, installed via `rustup install stable && rustup default stable`
- wasm32-wasi, can be installed via `rustup target add wasm32-wasi`
- cmake, depending on your operating system and architecture, it might not be
installed by default. On MacOS, it can be installed with `homebrew` via `brew
install cmake` On Ubuntu, `sudo apt-get install cmake`
- Rosetta 2, if running MacOS on Apple Silicon, can be installed via
`softwareupdate --install-rosetta`
## How to build
Inside this repository, run:
```
$ cargo build -p mjsc-core --target=wasm32-wasi -r
$ cargo build -p mjsc-cli -r
```
Alternatively, if you want to install the tool chain globally, inside this repository, run:
```
$ cargo build -p mjsc-core --target=wasm32-wasi -r
$ cargo install --path crates/mjsc-cli
```
If you are going to recompile frequently, you may want to prepend CARGO_PROFILE_RELEASE_LTO=off to cargo build for the CLI to speed up the build.