rute

Crates.iorute
lib.rsrute
version0.0.6
sourcesrc
created_at2018-09-29 08:23:48.881477
updated_at2018-12-27 17:22:15.143093
descriptionUI library implemented on top of Qt
homepage
repositoryhttps://github.com/emoon/rute
max_upload_size
id87099
size5,039,638
Daniel Collin (emoon)

documentation

README

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.

Commit count: 352

cargo fmt