# miniscript **Repository Path**: wanliofficial/miniscript ## Basic Information - **Project Name**: miniscript - **Description**: A tiny ECMAScript(JavaScript,JS) engine. This need only 8kB for ROM and need only 1kB for RAM. - **Primary Language**: C - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 0 - **Created**: 2021-09-15 - **Last Updated**: 2024-12-06 ## Categories & Tags **Categories**: scripting-language **Tags**: 虚拟机, 脚本引擎, JavaScript, mcu, 微处理器 ## README # MINIScript A tiny ECMAScript(JavaScript,JS) engine. This need only 8kB for ROM and need only 1kB for RAM. ## - Building - [osx] ``` $ gcc -m32 miniscript.c mslib.c main.c && ./a.out < sample.js ``` - [arm thumb size] ``` $ ~/gcc-arm-none-eabi-4_9-2015q2/bin/arm-none-eabi-gcc -c -mthumb -Os miniscript.c $ ~/gcc-arm-none-eabi-4_9-2015q2/bin/arm-none-eabi-size -A miniscript.o ``` ## Changes ### [0.1] 2016.03.11 + code parser + allocation: var + operators: =,+,- + statement: ; + native function ### [0.2] 2016.03.16 + comment: // + if-else: nested ok + operators: *,/,==,!=,(,) + scope: {} + scoped var ### [0.3] 2016.03.23 + while: nested ok + function: prams ok ### [0.4] 2016.04.04 + refactored + object: new,. ### [0.5] 2016.0?.?? + stack,scope... overflow check + refactored + immediate value: +,- + operators: %,<,>,<=,>= + statement: break --- + multiple var + operators: ! + try-catch, throw + tuned for speed