Jump to content

Rust: Difference between revisions

From KDE Community Wiki
JBB (talk | contribs)
Add cxx crate to bridging section
JBB (talk | contribs)
Shamelessly adding my own blog post
Line 68: Line 68:
* [https://michael-f-bryan.github.io/rust-ffi-guide/ Using unsafe for Fun and Profit] — tutorial for CMake-based Qt GUI using Rust library for the business logic
* [https://michael-f-bryan.github.io/rust-ffi-guide/ Using unsafe for Fun and Profit] — tutorial for CMake-based Qt GUI using Rust library for the business logic
* [https://os.phil-opp.com Writing an OS in Rust] — a series of tutorials about "close to the metal" programming in Rust
* [https://os.phil-opp.com Writing an OS in Rust] — a series of tutorials about "close to the metal" programming in Rust
* [https://jbbgameich.github.io/misc/2020/12/21/rust-in-a-kde-project.html Rust in a KDE Project] — Post on using Rust code in a C++/CMake project


= Useful components for KDE development =
= Useful components for KDE development =

Revision as of 20:09, 27 August 2021

The Rust Programming Language logo

Rust in KDE

Communication

Telegram: https://t.me/kderust

IRC: #kde-rust on Libera Chat

KDE projects that use Rust

Ikona — an icon preview utility for KDE Plasma

Repo: https://invent.kde.org/kde/ikona

ActivityDesk — a Qt/KDE-centric ActivityPub (Mastodon) client

Repo: https://invent.kde.org/jalcine/activitydesk

Angelfish — Mobile-friendly webbrowser

Rust code is used in the ad blocker.

Repo: https://invent.kde.org/plasma-mobile/angelfish

KDE tools for Rust

Rust Qt Binding Generator logo

Rust Qt Binding Generator

To use Rust code from Qt and QML code

Repo: https://invent.kde.org/sdk/rust-qt-binding-generator

Kate LSP Plugin

Rust Language Server can be used in Kate via the LSP plugin.

Repo: https://invent.kde.org/kde/kate/-/tree/master/addons%2Flspclient

KDevelop Rust Language Support Plugin (unmaintained)

To work on Rust code & projects in KDevelop.

Repo: https://invent.kde.org/unmaintained/kdev-rust

KDevelop Cargo Support Plugin (unmaintained)

To manage, build and run Rust packages (crates) with Cargo.

Repo: https://invent.kde.org/unmaintained/kdev-cargo

Ideas to use Rust

Dbus daemons that could be implemented in Rust and are self-contained :

  • solid
  • baloo
  • kioslave
  • Core of of Gui application in Qt

Documentation

Ferris the crab — Rust mascot

Rust Bookshelf

Contains multiple knowledge bases, of which the most useful for beginners are probably The Book and Rust By Example.

Link: https://doc.rust-lang.org/

Tutorials and guides

Useful components for KDE development

C/C++ <-> Rust bridging

  • ritual - crate generator to use C++/Qt libraries from Rust
  • bindgen - Rust binding generator for C libraries
  • cbindgen - C binding generator for Rust crates
  • cxx - Crate that generates safe binding code between rust and C++