5 releases (breaking)

0.4.0 Feb 17, 2020
0.3.0 Nov 2, 2019
0.2.0 Oct 27, 2019
0.1.0 Sep 9, 2019
0.0.0 Jan 7, 2019

#230 in FFI

Download history 343/week @ 2023-10-27 337/week @ 2023-11-03 446/week @ 2023-11-10 355/week @ 2023-11-17 333/week @ 2023-11-24 259/week @ 2023-12-01 266/week @ 2023-12-08 512/week @ 2023-12-15 495/week @ 2023-12-22 177/week @ 2023-12-29 321/week @ 2024-01-05 462/week @ 2024-01-12 272/week @ 2024-01-19 246/week @ 2024-01-26 199/week @ 2024-02-02 262/week @ 2024-02-09

1,113 downloads per month
Used in 222 crates (4 directly)


1.5K SLoC


Build Status

ritual allows to use C++ libraries from Rust. It analyzes the C++ API of a library and generates a fully-featured crate that provides convenient (but still unsafe) access to this API.

The main motivation for this project is to provide access to Qt from Rust. Ritual provides large amount of automation, supports incremental runs, and implements compatible API evolution. This is mostly dictated by the huge size of API provided by Qt and significant API differences between Qt versions. However, ritual is designed to be universal and can also be used to easily create bindings for other C++ libraries.

More information is available on rust-qt.github.io:


This project is licensed under either of

at your option.

If you use Qt, you should also take into account Qt licensing.


Contributions are always welcome! You can contribute in different ways:

  • Submit a bug report, a feature request, or an improvement suggestion at the issue tracker;
  • Write a test or an example for a Qt crate (porting examples from the official Qt documentation is a good option);
  • Pick up an issue with help wanted tag.

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


Utility types and functions used by ritual and ritual_build crates.

See README of the repository root for more information.


~116K SLoC