{"id":51290564,"url":"https://github.com/jeeyo/isere","last_synced_at":"2026-06-30T09:38:55.900Z","repository":{"id":156225420,"uuid":"509931242","full_name":"jeeyo/isere","owner":"jeeyo","description":"A serverless platform aimed to be running on Microcontrollers, powered by Zephyr and QuickJS","archived":false,"fork":false,"pushed_at":"2026-06-18T03:08:37.000Z","size":1455,"stargazers_count":5,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-06-18T05:08:56.911Z","etag":null,"topics":["javascript","microcontroller","serverless","zephyr-rtos"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jeeyo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-07-03T05:26:47.000Z","updated_at":"2026-05-20T23:06:55.000Z","dependencies_parsed_at":null,"dependency_job_id":"5e8d857d-ca91-46f2-9d14-2fc5531c1140","html_url":"https://github.com/jeeyo/isere","commit_stats":null,"previous_names":["jeeyo/isere-c"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jeeyo/isere","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeeyo%2Fisere","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeeyo%2Fisere/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeeyo%2Fisere/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeeyo%2Fisere/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jeeyo","download_url":"https://codeload.github.com/jeeyo/isere/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeeyo%2Fisere/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34961549,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-30T02:00:05.919Z","response_time":92,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["javascript","microcontroller","serverless","zephyr-rtos"],"created_at":"2026-06-30T09:38:55.349Z","updated_at":"2026-06-30T09:38:55.894Z","avatar_url":"https://github.com/jeeyo.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# isère\n\nA serverless platform for microcontrollers, powered by Zephyr RTOS, Rust, and QuickJS.\n\nHandlers are written in JavaScript (ES modules with async/await) and evaluated on-device by QuickJS. The device exposes an HTTP server over USB Ethernet (CDC-ECM), accepting requests and dispatching them through the JS handler — similar to AWS Lambda's programming model.\n\n## Architecture\n\n```\nHTTP request (USB Ethernet)\n  → Rust HTTP parser (httpd.rs)\n    → JS handler evaluation (QuickJS via FFI)\n      → HTTP response\n```\n\n- **Zephyr RTOS** — kernel, USB device stack, networking, DHCP server\n- **Rust** — HTTP server, event loop, request routing, platform abstraction\n- **QuickJS** — JavaScript runtime (C library linked via FFI)\n- **Target** — Raspberry Pi Pico 2 (RP2350, Cortex-M33)\n\n## Handler format\n\nHandlers follow an AWS Lambda-like signature:\n\n```js\nexport const handler = async function(event, context, done) {\n  return {\n    statusCode: 200,\n    headers: { 'Content-Type': 'text/plain' },\n    body: { key: 'value' }\n  }\n}\n```\n\nThe handler receives `event` (HTTP request with method, path, headers, query, body), `context` (function metadata), and an optional `done` callback for explicit completion.\n\n## Project structure\n\n```\n├── CMakeLists.txt           # Zephyr build entry point\n├── Cargo.toml               # Rust crate configuration\n├── prj.conf                 # Zephyr Kconfig\n├── west.yml                 # West manifest (Zephyr SDK + modules)\n├── boards/                  # Board-specific Kconfig + devicetree overlays\n│   ├── rpi_pico2_rp2350a_m33.conf / .overlay\n│   └── native_sim.conf / .overlay\n├── c_libs/\n│   ├── CMakeLists.txt       # QuickJS Zephyr library build\n│   ├── quickjs_shim.c       # FFI shims for static inline functions\n│   └── quickjs/             # git submodule: github.com/bellard/quickjs\n├── js/\n│   ├── handler.js           # JavaScript handler source\n│   └── handler.bin          # Pre-compiled bytecode (optional)\n├── scripts/\n│   ├── compile_bytecode.c   # Host tool: compile JS → QuickJS bytecode\n│   └── compile_bytecode.sh  # Build + run the bytecode compiler\n└── src/\n    ├── lib.rs               # Entry point, server loop, connection state machine\n    ├── httpd.rs             # HTTP/1.1 parser and response builder\n    ├── http_handler.rs      # Request → QuickJS → response bridge\n    ├── event_loop.rs        # Poll-based I/O event loop\n    ├── js/\n    │   ├── quickjs_ffi.rs   # QuickJS C API FFI bindings\n    │   ├── context.rs       # JS runtime wrapper (allocator, eval, poll)\n    │   └── polyfills.rs     # setTimeout / clearTimeout\n    └── platform/\n        ├── tcp.rs           # Zephyr POSIX socket wrapper\n        ├── loader.rs        # Handler loading (source or bytecode)\n        ├── logger.rs        # Zephyr printk logging\n        └── rtc.rs           # Monotonic clock via k_uptime_get()\n```\n\n## Prerequisites\n\n- [Zephyr SDK](https://docs.zephyrproject.org/latest/develop/getting_started/index.html)\n- [west](https://docs.zephyrproject.org/latest/develop/west/index.html) (Zephyr meta-tool)\n- Rust toolchain with `thumbv8m.main-none-eabihf` target\n- For bytecode compilation: 32-bit libc dev package (`gcc-multilib`)\n\n## Building\n\n```sh\n# Clone and initialize submodules\ngit clone https://github.com/jeeyo/isere-c.git\ncd isere-c\ngit submodule update --init\n\n# Set up Zephyr workspace\nwest init -l .\nwest update\n\n# Build for Raspberry Pi Pico 2\nwest build -b rpi_pico2/rp2350a/m33\n\n# Or build for native_sim (development/testing without hardware)\nwest build -b native_sim\n```\n\n### Flashing\n\n```sh\nwest flash\n```\n\n### Bytecode compilation (optional)\n\nPre-compile the JS handler to QuickJS bytecode for faster startup:\n\n```sh\n./scripts/compile_bytecode.sh\n# Then build with bytecode feature:\nwest build -b rpi_pico2/rp2350a/m33 -- -DEXTRA_CONF_FILE=bytecode.conf\n```\n\nThe bytecode compiler must be built for 32-bit to match the RP2350's pointer size.\n\n## Development with native_sim\n\nFor rapid iteration without hardware, use Zephyr's `native_sim` target with a TAP network interface:\n\n```sh\n# Build\nwest build -b native_sim\n\n# Run (requires TAP interface setup)\nwest build -t run\n```\n\n## Acknowledgments\n\n- [QuickJS](https://bellard.org/quickjs/) by Fabrice Bellard — JavaScript engine\n- [Zephyr RTOS](https://zephyrproject.org/) — real-time operating system\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjeeyo%2Fisere","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjeeyo%2Fisere","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjeeyo%2Fisere/lists"}