Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
d539a9c
Replace hand-rolled HTTP parser with httparse crate
claude Mar 26, 2026
ccd7dd5
Add Cargo.lock and gitignore target directory
claude Mar 26, 2026
02837e3
Remove .dockerignore
claude Mar 26, 2026
9601baf
Make HttpRequest zero-copy with direct buffer references
claude Mar 26, 2026
467f983
Update CLAUDE.md and README.md for httparse integration
claude Mar 26, 2026
39d6128
Update README.md
jeeyo Mar 26, 2026
1cacb7d
Update README.md
jeeyo Mar 26, 2026
02bb522
Add HTTP parsing unit tests and CI test job
claude Mar 26, 2026
8b279a9
Add integration tests for native_sim in CI
claude Mar 27, 2026
f79226a
Fix integration test: remove unsupported --eth-if argument
claude Mar 27, 2026
7a62832
Fix native_sim networking: add CONFIG_POSIX_API and CONFIG_NET_L2_ETH…
claude Mar 27, 2026
596b57d
Fix native_sim networking: use zsock_* FFI to call Zephyr's socket layer
claude Mar 27, 2026
39f07be
Add missing native_sim networking configs: ETH driver and real-time s…
claude Mar 27, 2026
fc1989f
Use C shim wrappers for Zephyr socket API instead of direct zsock_ li…
claude Mar 27, 2026
cf6e4b1
Fix socklen_t -> net_socklen_t and add missing ETH driver configs
claude Mar 27, 2026
7e86a1c
Use host sockets on native_sim, test via localhost instead of TAP
claude Mar 27, 2026
b1942a6
Add minimal permissions block to CI workflow
claude Mar 27, 2026
5e9c86f
Fix bash arithmetic exit code bug in integration test
claude Mar 27, 2026
950ed41
Fix bytecode pointer-size mismatch for 64-bit native_sim
claude Mar 27, 2026
999f601
Fix QuickJS GC assertion abort on native_sim, add RP2350 UF2 artifact
claude Mar 27, 2026
ffcf088
Fix native_sim bytecode: remove git placeholder before build
claude Mar 27, 2026
5a24887
fix event loop
jeeyo Mar 28, 2026
6b4719d
Add isere_k_msleep function to app_shim.c for sleep functionality
jeeyo Mar 28, 2026
cecb44c
Add debug logging to diagnose JS handler failure on native_sim
claude Mar 28, 2026
e1b7b70
Fix multi-request handler failure: remove JS_READ_OBJ_ROM_DATA flag
claude Mar 28, 2026
cb65956
Fix multi-request heap exhaustion: force-free QuickJS GC leaked objects
claude Mar 28, 2026
69cf27f
fix: correct event loop starvation and memory leak in JS handler (#32)
jeeyo Jun 18, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ on:
branches:
- main
pull_request:
branches:
- main

env:
ZEPHYR_SDK_VERSION: 1.0.0
Expand Down
4 changes: 2 additions & 2 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ The project was migrated from a C codebase (FreeRTOS + lwIP + TinyUSB) to **Zeph
## Build commands

```sh
west build -b rpi_pico2/rp2350a/m33 # hardware build
west build -b native_sim # development build (no hardware)
west build -b rpi_pico2/rp2350a/m33 # hardware build (Linux host required for -m32 bytecode)
west build -b native_sim/native/64 # development build in Docker (macOS arm64)
west flash # flash to device
```

Expand Down
74 changes: 40 additions & 34 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,44 +20,50 @@ set(HANDLER_JS ${CMAKE_CURRENT_SOURCE_DIR}/js/handler.js)
set(HANDLER_BIN ${CMAKE_CURRENT_SOURCE_DIR}/js/handler.bin)
set(COMPILE_BYTECODE ${CMAKE_CURRENT_BINARY_DIR}/compile_bytecode)

if(EXISTS ${HANDLER_BIN})
# handler.bin is already present (pre-built by CI or developer); use it.
add_custom_target(handler_bytecode ALL)
# native_sim runs on the host (64-bit on modern systems) — bytecode must match.
# RP2350 (Cortex-M33) is 32-bit — requires -m32 on the host compiler.
# macOS arm64 does not support -m32 at all, so native_sim is the only usable
# build target on Apple Silicon without a Linux cross-build environment.
if(BOARD MATCHES "native_sim")
set(BYTECODE_ARCH_FLAGS "")
else()
# Not present: build using the host's native gcc, not CMAKE_C_COMPILER
# (which would be arm-zephyr-eabi-gcc when cross-compiling).
find_program(HOST_CC gcc REQUIRED)
set(BYTECODE_ARCH_FLAGS "-m32")
endif()

find_program(HOST_CC gcc HINTS /usr/bin /usr/local/bin)
if(NOT HOST_CC)
find_program(HOST_CC cc REQUIRED)
endif()

add_custom_command(
OUTPUT ${COMPILE_BYTECODE}
COMMAND ${HOST_CC} -m32 -O2
-o ${COMPILE_BYTECODE}
${CMAKE_CURRENT_SOURCE_DIR}/scripts/compile_bytecode.c
${QUICKJS_DIR}/quickjs.c
${QUICKJS_DIR}/libregexp.c
${QUICKJS_DIR}/libunicode.c
${QUICKJS_DIR}/cutils.c
${QUICKJS_DIR}/dtoa.c
-I${QUICKJS_DIR}
-DCONFIG_VERSION='"2025-09-13"'
-D_GNU_SOURCE
-lm -lpthread
DEPENDS
${CMAKE_CURRENT_SOURCE_DIR}/scripts/compile_bytecode.c
${QUICKJS_DIR}/quickjs.c
${QUICKJS_DIR}/quickjs.h
COMMENT "Building host bytecode compiler (32-bit)"
)
add_custom_command(
OUTPUT ${COMPILE_BYTECODE}
COMMAND ${HOST_CC} ${BYTECODE_ARCH_FLAGS} -O2
-o ${COMPILE_BYTECODE}
${CMAKE_CURRENT_SOURCE_DIR}/scripts/compile_bytecode.c
${QUICKJS_DIR}/quickjs.c
${QUICKJS_DIR}/libregexp.c
${QUICKJS_DIR}/libunicode.c
${QUICKJS_DIR}/cutils.c
${QUICKJS_DIR}/dtoa.c
-I${QUICKJS_DIR}
-DCONFIG_VERSION='"2025-09-13"'
-D_GNU_SOURCE
-lm -lpthread
DEPENDS
${CMAKE_CURRENT_SOURCE_DIR}/scripts/compile_bytecode.c
${QUICKJS_DIR}/quickjs.c
${QUICKJS_DIR}/quickjs.h
COMMENT "Building host bytecode compiler (${BOARD})"
)

add_custom_command(
OUTPUT ${HANDLER_BIN}
COMMAND ${COMPILE_BYTECODE} ${HANDLER_JS} ${HANDLER_BIN}
DEPENDS ${COMPILE_BYTECODE} ${HANDLER_JS}
COMMENT "Compiling handler.js to QuickJS bytecode"
)
add_custom_command(
OUTPUT ${HANDLER_BIN}
COMMAND ${COMPILE_BYTECODE} ${HANDLER_JS} ${HANDLER_BIN}
DEPENDS ${COMPILE_BYTECODE} ${HANDLER_JS}
COMMENT "Compiling handler.js to QuickJS bytecode"
)

add_custom_target(handler_bytecode ALL DEPENDS ${HANDLER_BIN})
endif()
add_custom_target(handler_bytecode ALL DEPENDS ${HANDLER_BIN})


# Zephyr API shims for Rust FFI (k_uptime_get and similar __syscall functions
Expand Down
Loading
Loading