4 ms·
For those of unfamiliar with Racket, could you go over what it takes to run a Racket app on iOS?
by oidar 2y ago
For those of unfamiliar with Racket, could you go over what it takes to run a Racket app on iOS?
- the-chitmonger 2y agoI'd love to know as well - I found some documentation on the Racket site, but I'm not entirely sure what I'm looking at here. https://docs.racket-lang.org/inside/ios-cross-compilation.html https://docs.racket-lang.org/inside/ios-cross-compilation.ht...
- Bogdanp 2y agoSure! I have a whole library dedicated to integrating Racket and Swift and you can find some of the nitty-gritty details there[1]. The gist of it is: 1. You build Racket for iOS in an interpreted mode (regular Racket works a bit like a JIT in that it needs to load code into memory at runtime, which is a no-go on iOS) 2. You link to it as a regular static library. 3. You call Racket's C API[2] to load and run Racket code. Here's[3] a somewhat outdated video I did a while back on using that library for Mac app development. Many of the things in this video are now much simpler/more straightforward, but maybe it serves to give you an idea. I also have some source-available Mac apps built this way that you can take a look at[4, 5]. [1]: https://github.com/Bogdanp/Noise?tab=readme-ov-file#usage https://github.com/Bogdanp/Noise?tab=readme-ov-file#usage [2]: https://docs.racket-lang.org/inside/cs.html https://docs.racket-lang.org/inside/cs.html [3]: https://www.youtube.com/watch?v=aTvU0j4hBR0 https://www.youtube.com/watch?v=aTvU0j4hBR0 [4]: https://github.com/Bogdanp/remember https://github.com/Bogdanp/remember [5]: https://github.com/Bogdanp/Franz https://github.com/Bogdanp/Franz