Closed tionis closed 2 months ago
I'm pretty sure jart was one of the people who first got janet to run with cosmopolitan - helps that Janet has a sort of generic "Posix" target built in, but I would imagine it would mostly just work.
Makes sense, as cosmopolitan handles the other platform abstractions. I'll just try to compile the generic posix later with the cosmocc toolchain.
I got it working locally - however I needed to turn off IPV6 code and make some Makefile modifications to allow bypassing the shared library step. There also seem to be some extra warnings but otherwise it looks ok.
Should I leave this open then, until the cosmopolitan target supports ipv6 and the build process is documented?
I pushed a build changes yesterday, but I wouldn't consider this fixed until CI has a cosmopolitan build in it
The python.com binary allow embedding of pure python libraries in the binary itself, as it's a valid zip file. To add the same feature in Janet, a custom loader could be added to janet.com during the build process.
As mentioned in https://github.com/janet-lang/janet/discussions/1363, I'm interested in creating some APE binaries with Janet. @tionis it sounds like you managed to get this working?
You should be able to compile the cosmopolitan target with a working cosmopolitan environment to get a Janet APE executable. But anything else is not supported at the moment. I'd like to fix it up, but I'm not that well versed in C and got other projects with higher priority, so I don't know if/when I'll look into it again.
Supporting a cosmopolitan build target https://github.com/jart/cosmopolitan would be awesome. I'm not sure how complicated to do that would be though with all the ifdefs. Some more information on cosmopolitan: