-
Notifications
You must be signed in to change notification settings - Fork 219
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for more programming languages other than python? #289
Comments
So this is also a bit a request for documentation. A separate file |
You need to build a "C extension" for Ruby (or any other language). Azuls entire API is defined in a JSON file: https://github.com/fschutt/azul/blob/master/api.json The JSON file describes the entire public API, data types and functions, including documentation. The Python binding code (and the C and C++ headers) are then auto-generated from the build.py file: Lines 1200 to 1201 in e0bcb55
The build.py file itself generates a 20000-line The python extension bindings generate a lot of extra code, which is why they are behind a The only special thing with managed languages is how to pass function callbacks into Rust. For that, there are special "patches" to create a The CSS string is a feature of PyO3 (converting a Python String into a Rust String). Python creates the string object, passes it into a Rust function where it gets converted into a Rust String, then the CSS parser parses the string. |
I filed this under Question because this seems to cover most of it, but it is also a suggestion,
so ... not solely a question only.
I looked on the homepage and python code is shown:
From this I infer that python code works for azul too, and even (!)
CSS. Which is great.
I am looking for alternatives to gtk but also libui (which, at the least,
works on windows out of the box in ruby) - but I am looking to want
to use ruby. gtk has one advantage in this regard in that it offers
bindings via gobject-introspection.
How difficult would this be to add for ruby, and what would be necessary?
I assume it is a "finite" problem set as python already works on azul (I
assume so from the example). Could someone perhaps add a short
document explaining what would be necessary for adding more language
bindings? This is one area where libui excelled - tons of people created
bindings in the respective language.
Unfortunately my C/C++/Rust knowledge is very limited. I am quite ok-ish
with ruby, I can even use python too just fine, but preferably I would want
to use ruby since I wrote so much code in the last ~20 years in this
regard already. All my commandline stuff for instance. Right now I use
either the www or ruby-gtk3 for add-on GUIs to the commandline
code.
The text was updated successfully, but these errors were encountered: