Page 1 of 1

Python bindings using Pybind11

Posted: Sun Sep 03, 2017 05:59
by iceiceice
Hi,

I saw this in a reddit C++ post:

https://github.com/pybind/pybind11

Is there any interest in porting the CEGUI python bindings to use pybind11? It sounds pretty awesome and I remember that there have at times been compilation issues for the CEGUI python bindings when using certain versions of boost python.

Compiler support with pybind11 seems quite good. I haven't used it myself though. I don't know if it's really as good as they make it sound.

Anyways, thought I would post here!

Cheers,
iceiceice

Re: Python bindings using Pybind11

Posted: Sun Sep 03, 2017 07:18
by Ident
And how would we generate the bindings for this pybind11?

Re: Python bindings using Pybind11

Posted: Tue Sep 05, 2017 20:30
by iceiceice
I see, I guess boost::python doesn't have a generator either, but we already have bindings for it. If cegui wanted to use pybind11 then all that would have to be rewritten. So I guess this is a nonstarter. Oops! :oops:

Re: Python bindings using Pybind11

Posted: Tue Sep 05, 2017 20:41
by Ident
I dont know too much about how pybind works, it was honestly just a curious question because I dont know it myself. The binding creation seems the toughest part to me and it is quite a PITA according to Kulik, who declared it a process involving magic and him being the only one who knows how it is done. Clearly a very suboptimal situation for us. Optimally it should be possible to create the bindings with little hassle and I have not yet found a good way to do so.

Re: Python bindings using Pybind11

Posted: Tue Sep 05, 2017 21:16
by Ident
Lucebac suggested SWIG http://www.swig.org/

We would have to evaluate if this helps us in any way