Blink 1.0
github.com
github.com
> One of the projects currently using Blink is Cosmopolitan Libc. Blink is more embeddable than qemu-x86_64 since Blink is 22x tinier in terms of binary footprint. So what Cosmo does is it vendors prebuilt Blink binaries inside each of the x86-64 executables it compiles. That way, whenever someone tries to run these programs on a different architecture like Arm, the Actually Portable Executable shell script wrapper will simple extract the appropriate blink binary and re-run itself.
Cosmopolitan LibC is truly “write once run anywhere” except instead of using JVM virtualization, it used x86_64 as the portable VM. Your users don’t need to install a VM or runtime, and you can ship a single exe that runs on all popular architectures and operating systems, including bare metal.
master jart@nightmare:~/cosmo$ blink ruby --yjit -e 'printf("%d\n",2+2)'
<main>: warning: timer_create failed: Function not implemented, signals racy
4
master jart@nightmare:~/cosmo$ cat blink.log
I2023-06-05T04:22:15.525179:blink/syscall.c:1020:29575 unsupported prctl op 0x29
I2023-06-05T04:22:15.556803:blink/syscall.c:5720:29575 missing syscall 0x122
I2023-06-05T04:22:15.556866:blink/syscall.c:5720:29575 missing syscall 0x122
I2023-06-05T04:22:15.556886:blink/syscall.c:5720:29575 missing syscall 0x0de
You can also use `blink -es program...` to log system calls to stderr, similar to strace, when you need to troubleshoot further. Once you do that, please file a feature request.The most important post-SSE2 extensions are SSSE3 (pshufb) and SSE4.1 (rounding, min/max, blending, etc...). Pure SSE2 is a nightmare to use as it's a totally unbalanced SIMD ISA (a lot of missing stuff here are there requires a lot of workarounds and sometimes it's just better to go scalar). In addition, just [V]PSHUFB alone can do wonders and has a lot of application - I would say that almost all interesting problems can take the advantage of PSHUFB.
Instructions can be comfortably explored here:
This project seems to want to be "Blinkenlights". That's a cool name. Or "Blinken" or something mainframe-related.
Who am I to bikeshed on your project and its name?
I guess I thought wrong.
I reckon we all got better things to do than do a dick measuring contest on their behalf.
With Justine's work, I feel I would need to be more than a 1x engineer myself just to find the time to play with all of her creations.
I should make it absolutely clear that this is in no way taking a dig at the author’s work — I’d simply like to understand the practical use for something like this.
In other words, you can build a cosmopolitan executable (that runs on Linux, Windows, and other platforms) and extend it with blink, allowing the same binary to also run on those platforms that blink emulates.
For non-comsmopolitan binaries it needs a posix-compliant host (hence cigwin, but not Windows in general).
It'll likely run on top of wsl
"KVM is a type 1 hypervisor, which essentially means it is able to run on bare metal. QEMU is a type 2 hypervisor, which means that it runs on top of the operating system." -- https://linuxconfig.org/qemu-vs-kvm-hypervisor-whats-the-dif...
Is there a contributors guide for the project?
This must be leveraging that cosmopolitan libc awesomeness/insanity also by jart, then?