Packages

Run Elixir on Cloudflare Workers through AtomVM and WebAssembly

Current section

Files

Jump to
beamflare README.md
Raw

README.md

# Beamflare
This is a spike for running Elixir on Cloudflare Workers through AtomVM compiled to WebAssembly.
It should be noted that this has been designed as a scaffold through a spike only, there may be some incompatibilities. It is not realistic to run the full virtual machine in a serverless environment like Cloudflare Workers. Instead, Beamflare uses AtomVM as a small runtime.
## Run examples
```bash
./run-example hello
./run-example kv
./run-example d1
```
First run downloads the pinned AtomVM runtime automatically. Nothing to build manually.
## Use in another app
```elixir
defp deps do
[{:beamflare, path: "../beamflare"}]
end
```
```bash
mix deps.get
mix beamflare.init
npm install
mix beamflare.dev
```
Binding examples:
- `examples/kv_counter`
- `examples/d1_api`
R2, outbound fetch, and environment binding APIs are also included.