https://github.com/appcypher/wasabi
[WIP] Trying to be an alternative to Emscripten
https://github.com/appcypher/wasabi
Last synced: 9 months ago
JSON representation
[WIP] Trying to be an alternative to Emscripten
- Host: GitHub
- URL: https://github.com/appcypher/wasabi
- Owner: appcypher
- License: apache-2.0
- Created: 2019-02-11T02:06:07.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-07-09T09:29:46.000Z (almost 7 years ago)
- Last Synced: 2024-03-15T07:23:21.082Z (over 2 years ago)
- Language: Rust
- Homepage:
- Size: 64.5 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
WASABI
Wasabi is supposed to be a WebAssembly-focused way of generating wasm files from C/C++ code. Generated wasm files have what I call a `wasm32-llvm-linux` ABI.
### BUILDING THE PROJECT
#### BSD (macOS, ...) and Linux
- Clone the repository and its submodules.
```bash
git clone --recurse-submodules https://github.com/appcypher/wasabi.git
```
```bash
cd wasabi
```
- Wasabi is a [rust](https://www.rust-lang.org) project so it depends on `rustc` and `cargo`.
```bash
curl https://sh.rustup.rs -sSf | sh
```
- Build `wasabi` and its dependencies.
```bash
bash setup.sh install
```
This command does the following:
- clones the [`llvm`](https://llvm.org/) repository and builds it using steps defined in `wasmception`. This step may take a while.
- clones `musl` repository.
- builds the `wasabi` project.
- installs necessary commands like `wacc`, `wa++` and `wasabi`.
- After a successful install you should be able to use the `setup.sh` script through the `wasabi` command.
```bash
wasabi --help
```
- Use `wacc` or `wa++` command
```bash
wacc test.c -o test.wasm
```
```bash
wa++ test.cpp -o test.wasm -Wl,--export=func --gen=web
```
#### Windows
- N/A
### ATTRIBUTIONS
- [wasmception](https://github.com/yurydelendik/wasmception) - needed for installing llvm and getting libs/abis.
- [freepik](https://www.freepik.com/) - wasabi current logo