Using KConfig with Rust

A guide on how to use KConfig KDE Framework from Rust

Ayush Singh published on
7 min, 1315 words

Background

Hello everyone, I am currently working on KConfig bindings for Rust as a part of the Season of KDE 2022. The wrappers for most of the significant aspects of KConfig are complete, so I decided to rewrite the Introduction to KConfig Docs in Rust. The bindings are still not stable and will probably change before the end of the Season of KDE. Still, this post should also help me test out the bindings outside tests. The kconfig bindings can be found here.

Read More

Bitflags in Rust

Representing QFlags in Rust

Ayush Singh published on
4 min, 696 words

Background

While working on Rust bindings for KConfig as a part of Season of KDE 2022, I came across a few problems while trying to represent QFlags in Rust:

  1. Most QFlags are defined as C++ enums in which multiple members can have the same value. This is not possible in Rust enum.
  2. It is possible to enable multiple flags using BitwiseOr. Rust enums cannot do bitwise operations.
Read More

Creating Rust/QML Project

Using cargo-generate to create Rust/QML Project.

Ayush Singh published on
4 min, 639 words

Background

For the last few months, I have been pushing Rust/Qt development along. I am the author of ki18n crate and am currently in the middle of creating kconfig crate as a part of Season of KDE 2022.

In this post, I will walk you through creating a new Rust/QML project using cargo-generate templates. I made these templates to encourage more people to test out Qt development with Rust.

Read More