A serverless platform aimed to be running on Microcontrollers, powered by FreeRTOS, LwIP, and QuickJS
- FreeRTOS as Kernel
- JavaScript runtime
- QuickJS
- JerryScript
- Python runtime (?)
- MicroPython
- HTTP server
- Event Loop (no Keep-Alive support)
- Socket
- QuickJS
- Static Files (?)
- Event Loop (no Keep-Alive support)
- Unit tests
- loader
- js
- httpd
- http handler
- logger
- Unit tests on CI
- File System
- Configuration File
- Watchdog timer
- Integration tests
- Integration tests on CI
- Cloudflare Workers API (on QuickJS)
- crypto
- fetch
- process (env)
- console (log, warn, error)
- setTimeout / clearTimeout (FreeRTOS Timer)
- performance (?)
-
WebAssembly
- OpenTelemetry
- Metrics
- Sum (Counter)
- Cumulative
-
Delta(see Prometheus and OpenMetrics Compatibility)
- Gauge
- Sum (Counter)
-
Logs - Trace
- Metrics
- LogStash
- unbuffered printf()
- NDJSON logs
- Serial-to-LogStash integration
- Memory Leak Check
- Valgrind
- Optimization
- less libc usage
- Project Template
- Low-power mode
- Benchmark
- Doxygen
- Port
- Raspberry Pi Pico 2 (RP2350)
- ESP32?
- Monitoring
- CPU Usage (vTaskGetRunTimeStats)
- Memory Usage (vPortGetHeapStats)
- No Keep-Alive support
- JavaScript handler function needs to be stored sequentially and addressible in a memory
- File system is for storing static files and configuration files
Prerequisites:
- cmake
- make
- gcc
- cpputest
- xxd
- protoc
- python3
- ninja (optional for building c-capnproto)
brew install gcc cmake make libtool protobuf ninja
If you want to build unit tests, you also need to install CppUTest
brew install cpputest
export CPPUTEST_HOME=/opt/homebrew/Cellar/cpputest/4.0/
sudo apt-get install -y build-essential make cmake xxd protobuf-compiler ninja-build
For installing CppUTest, please follow Using CppUTest with MakefileWorker.mk and gcc section on CppUTest website.
git clone https://github.com/jeeyo/isere.git
git submodule update --init --recursive
mkdir build
cd build
cmake -DTARGET_PLATFORM=linux -DDEBUG=on .. # see Build configurations for more options
make -j
Name | Description | Supported values | Default value |
---|---|---|---|
TARGET_PLATFORM | Target platform to build isère executable for | linux, pico2 | linux |
DEBUG | Whether to build isère executable with debug symbol | off, on | off |
JS_RUNTIME | JavaScript runtime to execute handler function | quickjs, jerryscript | quickjs |
WITH_OTEL | Whether to send metrics to OpenTelemetry Collector | off, on | off |
OTEL_HOST | OpenTelemetry Collector OLTP/HTTP Host | "127.0.0.1" | |
OTEL_PORT | OpenTelemetry Collector OLTP/HTTP Port | 4318 |
./isere
A web server will start on port 8080 with the function defined in js/handler.js
See BENCHMARK.md
Special thanks to
- maxnet for tinyusb RNDIS to LwIP glue for Raspberry Pi Pico
- libuv for src/internals/uv_poll.c
- librdkafka for OpenTelemetry nanopb encoding