1. 25
  1.  

  2. 1

    The Cosmopolitan build is intriguing but a bit confusing:

    $ file wasm3-cosmopolitan.com 
    wasm3-cosmopolitan.com: DOS/MBR boot sector
    

    which is supposedly in APE format. from the readme: “APE is a polyglot format that runs natively on Linux + Mac + Windows + FreeBSD + OpenBSD + NetBSD + BIOS.” not sure how to run this. simply setting the execute bit gives “zsh: exec format error: ./wasm3-cosmopolitan.com”

    1. 6

      zsh currently has some POSIX incompatibility, but you can run it with

      sh -c "./wasm3-cosmopolitan.com <args>"
      

      also if you have wine installed or some specific environment, you may need to register the binfmt:

      sudo sh -c "echo ':APE:M::MZqFpD::/bin/sh:' >/proc/sys/fs/binfmt_misc/register"
      
      1. 2

        Same error here. @jart got a patch merged into ZSH, so it’s probably that you don’t have master. It works on modern Bash versions though

      2. 1

        Wow. Nice work. Is there a path to get a window/framebuffer from this?

        1. 2

          I saw some example for Windows, but it’s not cross-platform.