Rust: Difference between revisions
(Add media) |
m (Update link to ikona) |
||
(18 intermediate revisions by 6 users not shown) | |||
Line 1: | Line 1: | ||
[[File:Rust-logo-512x512-blk.png|thumbnail|right|The Rust Programming Language logo]] | [[File:Rust-logo-512x512-blk.png|thumbnail|right|The Rust Programming Language logo]] | ||
= Rust in KDE = | = Rust in KDE = | ||
== Communication == | |||
Matrix: https://go.kde.org/matrix/#/#kde-rust:kde.org | |||
IRC: #kde-rust on Libera Chat | |||
== KDE projects that use Rust == | == KDE projects that use Rust == | ||
==== Ikona — an icon preview utility for KDE Plasma ==== | ==== Ikona — an icon preview utility for KDE Plasma ==== | ||
Repo: https://invent.kde.org/ | Repo: https://invent.kde.org/sdk/ikona | ||
==== | ==== Angelfish — Mobile-friendly webbrowser ==== | ||
Repo: https://invent.kde.org/ | Rust code is used in the ad blocker. | ||
Repo: https://invent.kde.org/plasma-mobile/angelfish | |||
== KDE tools for Rust == | == KDE tools for Rust == | ||
Line 16: | Line 25: | ||
To use Rust code from Qt and QML code | To use Rust code from Qt and QML code | ||
Repo: https:// | Repo: https://invent.kde.org/sdk/rust-qt-binding-generator | ||
==== Kate LSP Plugin ==== | ==== Kate LSP Plugin ==== | ||
Line 23: | Line 32: | ||
Repo: https://invent.kde.org/kde/kate/-/tree/master/addons%2Flspclient | Repo: https://invent.kde.org/kde/kate/-/tree/master/addons%2Flspclient | ||
==== KDevelop Rust Language Support Plugin ==== | ==== KDevelop Rust Language Support Plugin (unmaintained) ==== | ||
To work on Rust code & projects in KDevelop. | To work on Rust code & projects in KDevelop. | ||
Repo: https:// | Repo: https://invent.kde.org/unmaintained/kdev-rust | ||
==== KDevelop Cargo Support Plugin ==== | ==== KDevelop Cargo Support Plugin (unmaintained) ==== | ||
To manage, build and run Rust packages (crates) with Cargo. | To manage, build and run Rust packages (crates) with Cargo. | ||
Repo: https:// | 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 = | = Documentation = | ||
[[File:Cuddlyferris.png|thumbnail|right|Ferris the crab — Rust mascot]] | [[File:Cuddlyferris.png|thumbnail|right|Ferris the crab — Rust mascot]] | ||
==== Rust | ==== Rust Bookshelf ==== | ||
Contains multiple knowledge bases, of which the most useful for beginners are probably [https://doc.rust-lang.org/book/ The Book] and [https://doc.rust-lang.org/stable/rust-by-example/ Rust By Example]. | Contains multiple knowledge bases, of which the most useful for beginners are probably [https://doc.rust-lang.org/book/ The Book] and [https://doc.rust-lang.org/stable/rust-by-example/ Rust By Example]. | ||
Link: https://doc.rust-lang.org/ | Link: https://doc.rust-lang.org/ | ||
==== Tutorials ==== | ==== Tutorials and guides ==== | ||
* [https://www.youtube.com/channel/UC0yCXVwW6FdDQGYA-3OWXxw YouCodeThings] — short video tutorials about programming in Rust | |||
* [https://blog.devolutions.net/2018/06/insider-series-using-rust-code-in-a-cc-project-with-cmake Using Rust Code in a C/C++ Project with CMake] | * [https://blog.devolutions.net/2018/06/insider-series-using-rust-code-in-a-cc-project-with-cmake Using Rust Code in a C/C++ Project with CMake] | ||
* [https://michael-f-bryan.github.io/rust-ffi-guide/ Using unsafe for Fun and Profit] | * [https://github.com/nrc/r4cppp Rust for C++ programmers] | ||
* [https://www.breakdown-notes.com/make/load/rust_cs_canvas/true Rust Breakdown Notes] | |||
* [https://locka99.gitbooks.io/a-guide-to-porting-c-to-rust/content/ A Guide to Porting C/C++ to Rust] | |||
* [https://rust-lang.github.io/rust-bindgen/ bindgen docs] | |||
* [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://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 = | ||
==== C/C++ <-> Rust bridging ==== | ==== C/C++ <-> Rust bridging ==== | ||
* [https://github.com/rust-qt/ritual ritual] | * [https://github.com/KDAB/cxx-qt/ KDAB's cxx-qt] — Safe Rust bindings for Qt | ||
* [https://github.com/rust-lang/rust-bindgen bindgen] | * [https://github.com/rust-qt/ritual ritual] — Crate generator to use C++/Qt libraries from Rust | ||
* [https://github.com/rust-lang/rust-bindgen bindgen] — Rust binding generator for C libraries | |||
* [https://github.com/eqrion/cbindgen cbindgen] — C binding generator for Rust crates | * [https://github.com/eqrion/cbindgen cbindgen] — C binding generator for Rust crates | ||
* [https://cxx.rs/ cxx] — Crate that generates safe binding code between rust and C++ | |||
* [https://github.com/google/autocxx Google's autocxx] — Tool for safe ergonomic Rust/C++ interop driven from existing C++ headers |
Latest revision as of 00:51, 6 June 2024
Rust in KDE
Communication
Matrix: https://go.kde.org/matrix/#/#kde-rust:kde.org
IRC: #kde-rust on Libera Chat
KDE projects that use Rust
Ikona — an icon preview utility for KDE Plasma
Repo: https://invent.kde.org/sdk/ikona
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
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
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
- YouCodeThings — short video tutorials about programming in Rust
- Using Rust Code in a C/C++ Project with CMake
- Rust for C++ programmers
- Rust Breakdown Notes
- A Guide to Porting C/C++ to Rust
- bindgen docs
- Using unsafe for Fun and Profit — tutorial for CMake-based Qt GUI using Rust library for the business logic
- Writing an OS in Rust — a series of tutorials about "close to the metal" programming in Rust
- Rust in a KDE Project — Post on using Rust code in a C++/CMake project
Useful components for KDE development
C/C++ <-> Rust bridging
- KDAB's cxx-qt — Safe Rust bindings for Qt
- 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++
- Google's autocxx — Tool for safe ergonomic Rust/C++ interop driven from existing C++ headers