[racket-dev] embedding racket without overriding main?

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Mon Sep 24 20:09:50 EDT 2012

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.


Posted on the dev mailing list.