As @dyoo pointed out, in Racket you can create an executable file from the menu and (depending on the selected / available options) package the necessary libraries; read the instructions. You can also create executables for other platforms using the tools command line.
For a more general and portable solution, consider compiling C code first and then compile from C to your own executable; look at the raco tool (section 9.3) or look at an implementation of a circuit designed for simple C compilation, such as a chicken circuit or a gambit circuit .
Getting the code to run under iOS may be more difficult, a quick search returned the Gambit REPL for iOS, try it, but I don’t know. I think there is support for compiling to native Objective-C code, although Gambit claims to have "full integration support for C compilers ++ and Objective-C ", you will have to experiment a bit with it.
Finally, note that the Racket-specific GUI (e.g. the one asked in the question) will almost certainly not be portable across different implementations / platforms of the circuit ...
source share