What embedding looks like from Factor (original) (raw)

Factor code will run inside an embedded instance in the same way it would run in a stand-alone instance.

One exception is that the global input-stream and output-stream streams are not bound by default, to avoid conflicting with any I/O the host process might perform. The init-stdio words must be called explicitly to initialize terminal streams.

There is a word which can detect when Factor is embedded:
embedded? ( -- ? )

No special support is provided for calling out from Factor into the owner process. The C library interface works fine for this task - see C library interface.