Gleam-native is a highly experimental unofficial fork of awesome Gleam language targeting native runtime via Cranelift.
Gleam relies heavily on BEAM abstractions. I highly regard Erlang and BEAM myself so decided to mimic parts of it in my native runtime for ecosystem capability. Native runtime currently is essentially tokio polling corosensei fibers as lightweight processes communicating via messages. The runtime features BEAM-like primitives for actor model like process mailboxes, links and monitors attached
I created this project just for fun, don't use it anywhere!
- gleam-native - compiler fork with native target introduced. Compiler lowers Gleam code to Cranelift-like intermediate
.nirrepresentation and compiles JIT/AOT targets using Cranelift infrastructure - gleam-native-stdlib - stdlib fork providing
@externalnative implementations for all its functions. Native code itself resides currently in gleam-native's native-runtime-stdlib crate. It will be moved to a separate dynamic library later - gleam-native-gleeunit - lean gleeunit fork for native target
- gleam-native-erlang - gleam_erlang fork. Absolute abomination. Native runtime implements parts of Erlang processing and communication model OTP is built upon. Some parts of it are Erlang-only: of course immature native runtime wouldn't feature stuff like distributed nodes
- gleam-native-otp - gleam_otp fork with native runtime support
- glimmer - toy example showcasing Gleam and its stdlib capabilities. It has benchmarks comparing BEAM, Node, Deno, Bun, and native AOT/JIT targets
- hive - toy example showcasing actor runtime. Benchmarks BEAM vs native AOT/JIT
- gleam-native-process - some leftovers after initial process model implementation. The most valuable part of it is isolated tests
- proc-spike - process model showcase I created to debug workstealing fibers. Almost no value, might delete later