https://github.com/danbugs/slightjs
This is an experimental project to make it possible to write JavaScript guest applications that make use of SpiderLightning capabilities.
https://github.com/danbugs/slightjs
js rust spiderlightning wasi-cloud wasm
Last synced: 11 months ago
JSON representation
This is an experimental project to make it possible to write JavaScript guest applications that make use of SpiderLightning capabilities.
- Host: GitHub
- URL: https://github.com/danbugs/slightjs
- Owner: danbugs
- Created: 2023-02-13T18:33:24.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-05-09T16:29:37.000Z (about 3 years ago)
- Last Synced: 2025-05-07T04:33:59.353Z (about 1 year ago)
- Topics: js, rust, spiderlightning, wasi-cloud, wasm
- Language: Rust
- Homepage:
- Size: 5.86 MB
- Stars: 13
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# slightjs
> 🔔: SlightJS has been merged upstream onto [SpiderLightning/`slight`](https://github.com/deislabs/spiderlightning). For intructions on how to use it in `slight`, please see [this](https://github.com/deislabs/spiderlightning#js)
This is an experimental project to make it possible to write JavaScript guest applications that make use of SpiderLightning capabilities.
It is comprised of:
- an `engine/`, which pre-initializes Wasm and injects slight dependencies into the JS context (i.e., w/ `quickjs-wasm-rs`), and
- a `cli/`, which inits the pre-initialized Wasm w/ actual guest code by passing it to the engine through `stdin`.
To try it out yourself, you can do:
```bash
make keyvalue-all-in-one
```
Here's a video demo:
[](https://youtu.be/dTyx3UTJdUI)
> The examples in this demo are run with slight v0.5.0.
## Installation
### UNIX
```sh
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/danbugs/slightjs/main/install.sh)"
```
### Windows
```sh
iex ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/danbugs/slightjs/main/install.ps1'))
```
## Engine Download
### UNIX
```sh
curl https://raw.githubusercontent.com/danbugs/slightjs/main/slightjs_engine.wasm --output slightjs_engine.wasm
```
### Windows
```sh
curl https://raw.githubusercontent.com/danbugs/slightjs/main/slightjs_engine.wasm -O slightjs_engine.wasm
```