Skip to content

Oyster Serverless is a cutting-edge, high-performance serverless computing platform designed to securely execute JavaScript (JS) and WebAssembly (WASM) code in a highly controlled environment.

Notifications You must be signed in to change notification settings

marlinprotocol/oyster-serverless

Repository files navigation

Oyster-serverless

Oyster Serverless is a cutting-edge, high-performance serverless computing platform designed to securely execute JavaScript (JS) and WebAssembly (WASM) code in a highly controlled environment. Built using the Rust and Actix Web framework, Oyster serverless leverages the power and security of AWS Nitro Enclaves, Cloudflare workerd runtime, and cgroups to provide unparalleled isolation and protection for the executed code.

Getting started

Install the following packages :

  • build-essential
  • libc++1
  • cgroup-tools

Note : Oyster serverless only works on Ubuntu 22.04 and newer versions due to limitations in the workerd dependency.

cgroups v2 setup

sudo ./cgroupv2_setup.sh

Signer file setup

A signer secret is required to run the serverless applicaton. The signer must be a secp256k1 binary secret. The Keygen repo can be used to generate this.

Running serverless application

Run the serverless application :

cargo build --release --target x86_64-unknown-linux-musl && sudo ./target/x86_64-unknown-linux-musl/release/oyster-serverless --signer ./path/to/signer

Make a request to the serveless application :

This transaction hash contains the JavaScript code that finds the prime factors of a given number : 0x9468bb6a8e85ed11e292c8cac0c1539df691c8d8ec62e7dbfa9f1bd7f504e46e

Endpoint (POST) : http://SRULW2UOQXWRDYUSZDFMBQKTTX3JDSGY5RROPW72T4N5P5IE4RXA.localhost:6000

JSON body :

{
    "num":10
}

Running the tests

The tests need root privileges internally. They should work as long as the shell has sudo cached, a simple sudo echo will ensure that.

sudo echo && cargo test -- --test-threads 1

About

Oyster Serverless is a cutting-edge, high-performance serverless computing platform designed to securely execute JavaScript (JS) and WebAssembly (WASM) code in a highly controlled environment.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published