"name": "my-sensor-script", "target": "eagle-craft", "memory": "128KB", "entry": "main.js", "dependencies": "@eagle-craft/gpio": "^1.0.0"
if (ec_is_error(result)) const char* err = ec_stringify(ctx, result); fprintf(stderr, "Error: %s\n", err); eagle craft javascript runtime
Eagle Craft JavaScript Runtime fills a critical gap between heavyweight JS engines (V8, JavaScriptCore) and minimal scripting languages (Lua, MicroPython). It brings the familiarity of JavaScript to resource-constrained environments without sacrificing safety or embeddability. For developers building IoT devices, game modding frameworks, or plugin systems, ECJR offers a pragmatic, performant, and sandboxed solution. ec_value_t result = ec_run_string(ctx
ec_context_free(ctx); ec_runtime_free(rt); return 0; JavaScriptCore) and minimal scripting languages (Lua
const char* script = "console.log('Hello from Eagle Craft');"; ec_value_t result = ec_run_string(ctx, script, "<main>");
Example package.json for an embedded project:
1. Overview Eagle Craft JavaScript Runtime (ECJR) is a lightweight, standalone JavaScript runtime environment designed for embedded systems, game scripting, and edge computing. Unlike traditional runtimes such as Node.js or Deno, which are built on V8 (Chrome’s high-performance engine), ECJR is built from the ground up with a focus on small memory footprint , deterministic execution , and easy embeddability into C/C++ or Rust applications.