4 ms·
You can use QuickJS as an Actually Portable Executable. $ echo 'console.log("hello world\n");' >hello.js $ zip o//third_party/quickjs/qjs.com hello.js
by jart 5y ago
You can use QuickJS as an Actually Portable Executable.
$ echo 'console.log("hello world\n");' >hello.js
$ zip o//third_party/quickjs/qjs.com hello.js
adding: hello.js (stored 0%)
$ o//third_party/quickjs/qjs.com /zip/hello.js
hello world
Just add your source code to the qjs.com executable using InfoZIP and you've got a single file releasable binary that'll run on seven operating systems. It's also about 700kb in size.
- tiborsaas 5y agoWhere to get qjs.com from?
- dflock 5y agoHere, I think? https://bellard.org/quickjs/binary_releases/ https://bellard.org/quickjs/binary_releases/
- tiborsaas 5y agoThose are .exe-s, I think .com is not typo
- jart 5y agoSpoiler alert git clone https://github.com/jart/cosmopolitan cd cosmopolitan make -j8 o//third_party/quickjs/qjs.com Build it on Linux but it runs anywhere. https://github.com/jart/cosmopolitan/tree/master/third_party/quickjs https://github.com/jart/cosmopolitan/tree/master/third_party... Here's a prebuilt binary https://justine.lol/qjs.com https://justine.lol/qjs.com
- deleted 5y ago[deleted]