coderhs
coderhs

Reputation: 4827

Link or use a c++ library inside crystal

I was wonder if it was possible to use a library like this in our crystal program to help schedule events or can we create a crystal shard that can interface with libevent.

Upvotes: 2

Views: 736

Answers (2)

Stephie
Stephie

Reputation: 3165

Libevent is already used by the crystal standard library to provided evented IO and the sleep function. You shouldn't need to bind libevent manually, just use normal IO, sleep and fibers. You can learn about how crystal handles concurrency here.

Upvotes: 2

Serdar Dogruyol
Serdar Dogruyol

Reputation: 5157

bindgen is a binding and wrapper generator for C/C++ libraries for Crystal

Upvotes: 2

Related Questions