How to change event-loop lib in vibed?

150 views Asked by At

I need to change event-loop in vibed. Docs says that "vibe.d has always used libevent under the hood by default" and "libasync is a cross-platform event loop library written completely in D".

How I can change libevent to libasync?

I found example of dub.json config, but how I can set it in dub.sdl?

upd: it's seems that versions "libasync" is working.

1

There are 1 answers

3
DejanLekic On BEST ANSWER

If you want to use built-in libasync support in vibe-d, add the following to your dub.json:

"dependencies": {
    "vibe-d": ">=0.8.1"
},
"subConfigurations": { 
    "vibe-d": "libasync" 
}

If you prefer SDL, your dub.sdl file should contain something like:

dependency "vibe-d" version=">=0.8.1"
subConfiguration "vibe-d" "libasync"