Skip to content

Upstream Moddable Engine#860

Open
jplexer wants to merge 8 commits intocoredevices:mainfrom
jplexer:moddable
Open

Upstream Moddable Engine#860
jplexer wants to merge 8 commits intocoredevices:mainfrom
jplexer:moddable

Conversation

@jplexer
Copy link
Member

@jplexer jplexer commented Feb 18, 2026

No description provided.

@jplexer jplexer requested a review from gmarull February 18, 2026 22:22
@jplexer
Copy link
Member Author

jplexer commented Feb 18, 2026

I love finding errors that only appear once you do clean builds

@jplexer
Copy link
Member Author

jplexer commented Feb 18, 2026

Waiting on pebble-dev/pebbleos-docker#3

@jplexer
Copy link
Member Author

jplexer commented Feb 19, 2026

Waiting on Moddable-OpenSource/moddable#1566

@jplexer
Copy link
Member Author

jplexer commented Feb 19, 2026

@gmarull compliance check is failing because I pulled in some code that is licensed ISC, which is compatible in our code base, but the compliance check obviously only checks for Apache 2. Also, code will not build yet because it's missing that one commit from Moddable, but I uploaded it anyway for review :)

Copy link
Member

@gmarull gmarull left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, just a few nitpicks

@gmarull
Copy link
Member

gmarull commented Feb 19, 2026

sorry for the rebase headache :-)...

Signed-off-by: Joshua Jun <joshuajun@proton.me>
Signed-off-by: Joshua Jun <joshuajun@proton.me>
@jplexer jplexer force-pushed the moddable branch 2 times, most recently from 853da5b to ac71f47 Compare February 19, 2026 21:40
Signed-off-by: Joshua Jun <joshuajun@proton.me>
Signed-off-by: Joshua Jun <joshuajun@proton.me>
The Moddable XS JavaScript engine requires standard C library
declarations beyond what pblibc previously provided. Extend the libc
stub headers with missing declarations (fpclassify, isfinite, isnormal,
fprintf, vprintf, stderr, longjmp noreturn attribute) and chain float.h
to the toolchain header via include_next for FLT_EVAL_METHOD. Add math
implementations from NuttX for fabsl, floor, log, and log2.

Signed-off-by: Joshua Jun <joshuajun@proton.me>
Send DEINIT event to process before setting exit trap to
ensure blocked syscalls (like sys_get_pebble_event) can
return and trigger proper cleanup flow.

Signed-off-by: Joshua Jun <joshuajun@proton.me>
Add support for 'moddable' project type in build configuration.
Auto-inject MOD resource from compiled XS archive for moddable
builds. Update resource generation to handle moddable projects
alongside app and rocky types.

Signed-off-by: Joshua Jun <joshuajun@proton.me>

# Conflicts:
#	sdk/waftools/pebble_sdk.py
#	sdk/waftools/process_sdk_resources.py

Signed-off-by: Joshua Jun <joshuajun@proton.me>
Instead of requiring --js-engine to be passed explicitly, default to
moddable for boards with HAS_MODDABLE_XS and none otherwise. This
keeps the CLI override available but removes the need for CI workflows
to specify --js-engine per board.
Also force JS_ENGINE to none for PRF builds and move the PRF env
switch earlier in build() so moddable is not compiled into recovery
firmware.

Signed-off-by: Joshua Jun <joshuajun@proton.me>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments