Rute is a UI library implemented on top of Qt
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
rute Bump to 0.0.6 Dec 27, 2018
rute_gen Support .build() Dec 22, 2018
rute_header_def_gen Added Gui/Core/Applications Dec 16, 2018
.clang-format Lots of more generated code (#19) Nov 25, 2018
.gitignore Added inital tool for pre parsing Qt headers Sep 7, 2018
.travis.yml Map Qt enums 1:1 to Rust side (#20) Dec 22, 2018
appveyor.yml Use verbose to get some more info Sep 30, 2018
details.md Added some info still WIP May 4, 2018
readme.md

readme.md

Build Status Build status

Rute

Rute is a UI library implemented on top of Qt for Rust. There are already several such projects such as rust-qt and qmlrs so what maske Rute different?

Overview

Rute takes a different approach than many in the way the API is generated:

  • Instead of parsing the C++ headers or doing everything manually an API description file is being used.
  • A C API is generated as an intermediate step but is also useable from pure C code
  • All C++ generated code that is needed for the C bindings gets (optionally) generated to a shared object (dll/dylib/so) that the Rust/C API can use.
    • Only a single symbol with function pointers are exposed. This make it a good fit to pass this struct around to shared objects used by an application.
    • This also allows host application allow to use plugins (shared objects) and just pass down a single pointer for the whole UI interface.

Details

For details on how this works see this (WIP and a bit out of date)

Status

Rute is currently in early development and isn't really useable except for some basic examples

Pros

  • Doesn't require the user to build all bindings which some other generators do.
  • Cross-platform. There is no need to generate specific bindings for each platform.
  • Can keep all C++ generated code inside a single shared object. There is no need for a Rust or C program to link with any C++ code.
  • The separation allows a host program to load the dll and pass the interface around very cheap (single pointer)
  • Separation also allows for plugins (shared objects) to use this without linking directly with Qt making them agnostic to Qt version used.
  • Slots and signals and virtual overrides works directly from Rust/C and can be set directly on objects.
  • No code generation is needed to bind with Slots/signals as it is with Qt C++
  • Provides a safer API than the regular C++ one.

Cons

  • Signals and slots can't easily be defined as in C++ and is only present for the ones defined in the API.
  • Currently very WIP. Has (known) memory leaks that needs to be fixed.
  • Added layers will impact performance. How much it will be in practice needs to be tested.

Source code License

Licensed under either of

at your option.

Documentation License

The Qt documentation is licensed under the GNU Free Documentation License version 1.3 and thus the documentation for Rute is under the same licence.

Qt Licence

Remember if you are planning to release an application using Rute you will have use a Qt licence as well which you can read about here

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.