Posted Sat, 16 Jul 2016 20:45:35 +0200 in reply to
Paul D Anderson
Reply
Am 16.07.2016 um 02:30 schrieb Paul D Anderson:
I've installed vibe.d (just to use ddox, and the generated documents look great). But I don't understand how to prevent vibe.d from hijacking my main program.
The docs seem to say I should import vibe.vibe rather than vibe.d and set up a custom version, but having installed vibe.d via DUB as a dependency, I don't seem to have a way to do that.
My application doesn't need web services. Is there a way to run vibe only for ddox?
I appreciate that this may be a dub question rather than vibe, but I'd appreciate any help in pointing me in the right direction.
Paul
What are exactly the effects that you observed? Unless the
VibeDefaultMain
version identifier is defined, vibe.d's main()
function shouldn't be included.
However, what will always be included is the initialization code that
sets up a per-thread event driver, and - you will probably want to
disable that by callingvibe.core.core.disableDefaultSignalHandlers()
at the start of main()
- a signal handler for Ctrl+C and some others.
The signal functionality is planned to eventually be also handled by the
event loop in the future, so that this step will become mostly obsolete.