Coding Rust ♥ Gnome: rust, gtkrs, flatpak
rust
toolchain: rust, cargo, rustup
- cargo, rustc, rustup
cargo new help # help cargo build cargo run cargo doc
rustup show
documents: std, examples
rust ♥ gnome(gtkrs & flatpak)
toolchain: meson, ninja, gtkrs(cargo)
new project (with template)
- git clone https://gitlab.gnome.org/bilelmoussaoui/gtk-rust-template.git
- cd gtk-rust-template
- python3 create-project.py
build, install, run, test with meson/ninja
meson --prefix=/usr/local -Dprofile=development build
ninja -C build
sudo ninja -C build install
ninja -C build run # or app_name
ninja -C build test # run tests
RUST_LOG=DEBUG ./run_target
documents
- gtk-rs tutorials, reference,
- How to Flatpak a Rust application
note:
- Add run, release, test in meson.build run_target # refer to Tau
- env_logger
env_logger::Builder::from_default_env().init();
- install meson with pip3
- install pip3 with apt
sudo apt-get install python3-pip
- install the latest meson with pip3
su # note: must install meson with root. pip3 install meson
cargo-gtkrs cmd(imaging)
cargo gtkrs cmd user case
cargo install cargo-gtkrs
cargo generate (with examples) # like ignite
cargo gtkrs add switch
cargo gtkrs add searchbar
cargo gtkrs add grid_list
cargo gtkrs add list (snappit: builder ui, signals)
cargo gtkrs add panned_list
add pattern with gnome pattern