js-f0
js-f0 copied to clipboard
JavaScript on the Flipper Zero
js-f0
JavaScript... on the Flipper Zero?
Notice
I'll be returning from my break. Development will be slow, as I have other priorities, but with the amount of interest being shown, I'd feel bad for not putting in work.
How?
This is all possible using the microvium JavaScript engine. Check it out!
Installation
Download the artifact from the most recent successful action and put it in /ext/apps on your Flipper Zero.
Usage
- Install microvium on your computer with
npm install -g microvium. - Create a new script with the following contents:
// script.mvm.js
console.log = vmImport(7);
function main() {
console.log('Hello, World!');
}
vmExport(1, main);
- Compile it with
microvium script.mvm.js. This will make a file in the same directory calledscript.mvm-bc. - Copy
script.mvm-bcto/ext/apps_data/json your Flipper Zero. - Run
JavaScripton your Flipper Zero. - Press the center button to open the console and find "Hello, world!" in the log!
Fully implemented standard functions
console.log()console.warn()console.clear()
Incomplete implemented standard functions
fs.openSync()- Untested
Currently WIP standard functions
confirm()