All Projects → avidal → fastlike

avidal / fastlike

Licence: MIT license
Run Fastly Compute@Edge Wasm programs on your own computer, powered by wasmtime

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to fastlike

Lightbeam
Lightbeam has moved and now lives in the Wasmtime repository!
Stars: ✭ 253 (+602.78%)
Mutual labels:  wasm
glicol
(Audio) graph-oriented live coding language and music DSP library written in Rust
Stars: ✭ 853 (+2269.44%)
Mutual labels:  wasm
wsPlayer
wsPlayer is a web video player based on WebSocket-fmp4.
Stars: ✭ 88 (+144.44%)
Mutual labels:  wasm
Yew
Yew is a modern Rust framework for creating multi-threaded front-end web apps with WebAssembly.
Stars: ✭ 18,243 (+50575%)
Mutual labels:  wasm
python-wasm
Build scripts and configuration for building CPython for Emscripten
Stars: ✭ 606 (+1583.33%)
Mutual labels:  wasm
aWsm
WebAssembly ahead-of-time compiler and runtime. Focuses on generating fast code, simplicity, and portability.
Stars: ✭ 177 (+391.67%)
Mutual labels:  wasm
Rust Yew Realworld Example App
Exemplary real world app built with Rust + Yew + WebAssembly
Stars: ✭ 249 (+591.67%)
Mutual labels:  wasm
rotation master
Provide conversion between the major representations of 3D rotation and visualize the orientation of a rigid body
Stars: ✭ 157 (+336.11%)
Mutual labels:  wasm
hash-wasm
Lightning fast hash functions using hand-tuned WebAssembly binaries
Stars: ✭ 382 (+961.11%)
Mutual labels:  wasm
go-wasm-pdfcpu
Running a Command line tool written in Go on browser with WebAssembly
Stars: ✭ 79 (+119.44%)
Mutual labels:  wasm
fastly
Fastly API client for Node.js
Stars: ✭ 70 (+94.44%)
Mutual labels:  fastly
go-fastly-cli
CLI tool for interacting with Fastly CDN services via official REST API.
Stars: ✭ 14 (-61.11%)
Mutual labels:  fastly
emscripten-webxr
WebXR library for use with Emscripten.
Stars: ✭ 21 (-41.67%)
Mutual labels:  wasm
Tfjs
A WebGL accelerated JavaScript library for training and deploying ML models.
Stars: ✭ 15,834 (+43883.33%)
Mutual labels:  wasm
parametric surfaces
Parametric surfaces drawn using the Rust + WASM toolchain with WebGL, React, and TypeScript.
Stars: ✭ 43 (+19.44%)
Mutual labels:  wasm
Prism
Build frontend web apps with Ruby and WebAssembly
Stars: ✭ 251 (+597.22%)
Mutual labels:  wasm
vgg runtime
VGG Runtime for loading and running designs as apps.
Stars: ✭ 19 (-47.22%)
Mutual labels:  wasm
bounce
The uncomplicated Yew State management library
Stars: ✭ 43 (+19.44%)
Mutual labels:  wasm
wasp
🐝 Wasp : Wasm programming (language)
Stars: ✭ 93 (+158.33%)
Mutual labels:  wasm
watpl
Create WebAssembly modules using template strings
Stars: ✭ 14 (-61.11%)
Mutual labels:  wasm

fastlike

fastlike is a Go project that implements the Fastly Compute@Edge ABI using wasmtime and exposes a http.Handler for you to use.

There's an example proxy implementation in cmd/fastlike which you can run with:

$ go run ./cmd/fastlike -wasm <wasmfile> -backend <proxy address>

You'll need a Fastly Compute@Edge compatible wasm program to run the example proxy. The simplest way to do that is via the fastly cli and using one of the starter kits.

After scaffolding your wasm program using a starter kit and modifying it to your liking, you'll need to build the wasm binary:

$ fastly compute init my-compute-project
# answer the prompts, creating a rust or assemblyscript project
$ fastly compute build

And then use the resulting wasm binary in fastlike:

$ go run ./cmd/fastlike -wasm my-compute-project/bin/main.wasm -backend <proxy address>

You don't need the fastly CLI to build the test program either, as long as you have rust installed and the wasm32-wasi target available:

# This example is using one of the guest implementations of the spec tests
$ cargo target add wasm32-wasi # ensure we have the wasm32-wasi for the current toolchain
# The wasm32-wasi target is configured as the default target via `specs/testdata/rust/.cargo/config`
$ cd specs/testdata/rust; cargo build; cd ../../..
$ go run ./cmd/fastlike -wasm ./specs/testdata/rust/target/wasm32-wasi/debug/example.wasm -backend <proxy address>

However, using the fastly cli will help ensure your toolchains are properly up to date and your dependencies are in-order.

For a more full-featured example, using the default rust starter kit:

# in one terminal:
$ go run ./cmd/fastlike -wasm ./my-compute-project/bin/main.wasm -backend localhost:8000 -bind localhost:5000

# in another
$ python3 -m http.server

# in a third
$ curl localhost:5000/backend

Go, running Rust, calling Go, proxying to Python.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].