Code Monkey home page Code Monkey logo

slingshot's Introduction

SlingShot

How to run serverless applications augmented by Wasm

SlingShot is a Wasm runner to run or serve Extism Wasm plug-ins.

Run a wasm plug-in:

./slingshot run --wasm=./hello.wasm --handler=hello --input="Bob ๐Ÿค“"

Serve a wasm plug-in as a function:

./slingshot listen --wasm=./hello.wasm --handler=handle --http-port=7070

Trigger a wasm plug-in with Redis messages:

./slingshot redis subscribe --wasm=./hello.wasm --handler=message \
--uri=${REDIS_URI} \
--client-id=007 \
--channel=news

Trigger a wasm plug-in with NATS messages (โœ‹ experimental ๐Ÿšง WIP):

./slingshot nats subscribe --wasm=./hello.wasm --handler=message \
--url=${NATS_SERVER_URL} \
--connection-id=007 \
--subject=news

Execute a remote wasm file:

./slingshot run \
--wasm-url="http://0.0.0.0:9000/print.wasm" \
--wasm=./print.wasm \
--handler=callHandler \
--input="๐Ÿค“ I'm a geek"

Run Slingshot with Docker (multi arch image ๐Ÿณ):

HTTP_PORT=8080
docker run \
    -p ${HTTP_PORT}:${HTTP_PORT} \
    -v $(pwd)/hello-service:/app --rm botsgarden/slingshot:0.0.5 \
    /slingshot start \
    --wasm=./app/hello.wasm \
    --handler=callHandler \
    --http-port=${HTTP_PORT} 

How is Slingshot developed?

Slingshot is developed in Go with Wazero1 as the Wasm runtime and Extism2, which offers a Wazero-based Go SDK and a Wasm plugin system.

Install SlingShot

Footnotes

  1. Wazero is a project from Tetrate โ†ฉ

  2. Extism is a project from Dylibso โ†ฉ

slingshot's People

Contributors

k33g avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

slingshot's Issues

Chain function calls and forward results between functions

question:

  • same slingshot process (share the data/results with the memory of the host application)
  • or one slingshot process per function (find a way to share the data/results)
  1. Run Slingshot with the first function,
  2. Then, Slingshot will run the following process with the result (--input???)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.