Wrapping libwebsockets C Library with Julia

I’m sure that the right thing to do is to use something like Clang.jl to generate the wrapper for you. I don’t know much about it, even though I have drug my eyes over the documentation a few times.

If you are mildly masochistic, you can write Julia analogs of the structures used, and call all of the library functions from Julia using @ccall. I have a semi-large-ish C++ library that I have wrapped that way. I don’t have any experience with libwebsockets, but it looks semi-large. Probably large enough to make fussing around with Clang worthwhile.

Here is my example code (in this Discourse link). Since you are wrapping C, you wouldn’t need to have a C library wrapper layer. I do recommend that you get bindings autogenerated, rather than doing it manually though.