[racket-dev] embedding racket without overriding main?
At Mon, 24 Sep 2012 15:10:08 -0700, Dan Liebgold wrote:
> Does anyone have an example of embedding 3m Racket (5.3) in a C++ program
> without overriding main? I have a legacy C++ app that wants to eval some
> Racket code but I'd like to be minimally invasive. Might need to shell
> out...
One strategy is to start a separate OS-level thread for Racket. The
rest of the C++ program would send expressions to the Racket thread
evaluation via a pipe or some kind of semaphore-based communication.
On Windows, you could also try using MzCOM, which is sort of half-way
between managing your own thread and starting a separate process.