-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FL-3579, FL-3601, FL-3714] JavaScript runner #3286
Conversation
PVS-Studio report for commit |
Compiled f7 firmware for commit |
so excited about this 🤩 |
Just noting - JavaScript - while popular is a very heavy language compared to something like C. The flipper isn't exactly a compute powerhouse, so I'm concerned that there will be a substantial performance penalty integrating a high-level interpreted language like this. thoughts? |
I believe there are available tooling to convert Js to C. I wonder if this could be part of a "build process" to enable the faster running of the Js. |
I think that would be a great idea because it allows devs more familiar with JavaScript to write applications for the Flipper platform which as I understand would be the intent of this PR. Obviously, we'd want to build BEFORE reaching the end device - no JIT stuff - because you do not want to compile C on the flipper. So you'd be able to write JS and have that build to a binary |
This would be perfect for NFC KDF plugins (#3197) |
Looking forward to this! |
@vtrenton It's also worth noting that MJS is not any known version of JavaScript. It's a proprietary subset that misses critical features to the point that I'm a bit hesitant to call it JavaScript. This also means no TypeScript support out of the box and no npm package transpilation (not just the heavy modules, no, not even a single line hello world program would be allowed) unless one can figure out how to polyfill. TBH I don't know how usable this really is other than writing some really simple programs with it, since for more complex programs the development overhead might be even bigger than C especially without TypeScript support. |
Great news! Wanna see docs about this feature. |
What's new
Verification
Checklist (For Reviewer)