Limnetic-Git/mojelly
Limnetic-Git/mojelly has 34 GitHub stars and 2 forks. GitHot measured 0 stars in 24 hours. Last checked 2026-11-15 17:14 UTC. Last push 2026-11-13.
Measured star growth
- in 24h
- 0
- in 7 days
- Collecting history
- in 15 days
- Collecting history
- in 1 month
- Collecting history
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
About
Fast Async backend framework for Mojo π
Web & AppsREADME.md
OriginalMojelly Framework π
β Starred by @lattner β creator of LLVM, Swift, and Mojo
Thank you, Chris :)
π Mojelly
Fast async backend framework for Mojo
About Mojelly β
Mojelly - Fast async opensource backend framework for Mojo π! Mojelly started as Limnetic's (creator, me :D) pet-project which was created for test of Mojo's speed with Zero-Copy FFI with C. And Mojo is young lang, very powerful with simple syntax. So, it was cool challenge for me. Mojelly is created to be fast-enough, simple to use and easy to contribute, that makes it good choice to you to join the project!
Logging π
Per-request logging is off by default (it costs ~20% throughput). Enable it at startup:
MOJELLY_LOG_LEVEL=1 ./server
Worker threads π§΅
By default Mojelly starts one worker per CPU the process is allowed to use (so taskset and container cpusets are respected) and pins each worker to one of those CPUs. Override the count with MOJELLY_THREADS:
MOJELLY_THREADS=4 ./server
Limits and timeouts π‘οΈ
Safe defaults, overridable with environment variables at startup:
| Variable | Default | Meaning |
|---|---|---|
MOJELLY_MAX_HEADER_SIZE |
65536 | URL + headers of one request, bytes (over β 431) |
MOJELLY_MAX_BODY |
10485760 | request body, bytes (over β 413) |
MOJELLY_IDLE_TIMEOUT |
60 | seconds without traffic before a connection is closed (0 = off) |
MOJELLY_REQUEST_TIMEOUT |
30 | seconds allowed to receive one complete request (0 = off) |
Timeouts are checked once a second, so they are accurate to about one second.
Performance CI π
Every PR to main or dev is benchmarked by .github/workflows/perf.yml: the PR head, dev and main are built and measured one after another on the same runner, and the result is posted as a PR comment. For each scenario (/json with 100 and 500 connections, a new connection per request, browser-like headers and cookies, a larger /html body) it shows requests/s, p99 latency and server CPU per request, and the PR's change against dev and main. The job fails if the PR is more than 15% slower than its base branch and the change is larger than the run-to-run noise.
Run it locally (needs oha and a built ./server in each directory):
python3 scripts/perf_run.py --build main=../main --build dev=../dev --build pr=. --out results.json
python3 scripts/perf_report.py results.json --pr pr --base dev
What we use βοΈ
Mojo language
C language
Bash (for build.sh)
llhttp
libuv (soon maybe will be change to io_uring)
openssl (not yet)
pthread
gcc compiler
emberjson
Mojelly's logo πΌοΈ
Mojelly's logo is a GRAPE! πππ
(Idk why, "jelly" sounds cool and I associate with grapes)
β οΈ WARNING: FRAMEWORK (as like as Mojo) WORKS ONLY ON LINUX! USE WSL OR LINUX DISTRO. Pls test it on MacOS
Here is simplest server with Mojelly:
from mojelly.http.request import HTTPRequest
from mojelly.http.response import HTTPResponse
from mojelly.core.router_handlers import RouterHandlers
# Hello world plain text response
def hello_world(mut req: HTTPRequest) -> HTTPResponse:
return HTTPResponse(200, "Hello, World")
def main():
var router = RouterHandlers()
router.get("/", hello_world)
var server = HTTPServer(router)
server.listen(8080)
server.run()
After this, run build.sh π οΈ:
bash build.sh
It will generate build/app_generated.mojo and auto-compile it to server binary file.
Then, you can run your server! π
./server
Normally is looks like that:
β― bash build.sh
π§ Using pixi environment...
π₯ Using Mojo via pixi:
Mojo 1.1.0 (ed45d567)
π Checking C core...
π¦ libmojelly.a not found, building...
π¨ Building C core with -O3...
β
libmojelly.a rebuilt!
-rw-r--r-- 1 limnetic limnetic 20610 ΡΠ΅Π½ 8 01:14 lib/libmojelly.a
π’ Calling for server-code generator...
π§ Generating server code...
Mode: MULTITHREADED
β
Generated: build/app_generated.mojo
π¦ Run: ./build.sh
π¦ Building server...
β
Server built! Run ./server
To run:
./server
β― ./server
π Mojelly HTTP Server (Multithreaded)
[C] β
All 4 threads created
β
Worker threads started
π Server listening on port 8080
[C] π§΅ Thread 2 listening on CPU 2 (port 8080)
[C] π§΅ Thread 3 listening on CPU 3 (port 8080)
[C] π§΅ Thread 1 listening on CPU 1 (port 8080)
[C] π§΅ Thread 0 listening on CPU 0 (port 8080)
[03:38:52] [T0] GET / 200 0.01ms
[03:38:54] [T1] GET /qwerty 404 0.00ms
If you are interested, please β this project :) Thank you! π