In this episode, we'll build a GUI app in Rust (`headlines`) to make use of the newsapi crate we built before. Headlines is a news reading app.
NOTE: Please follow this tutorial with eframe = "0.14.0" to have reproducible results.
Part A of this episode, is where we plan our UI, data model and scaffold our frontend UI using an immediate mode GUI library.
Later in part B (the next video) we'll make this thing come to
life by fetching data from newsapi.org. We'll learn about threads, channels and
how to manage asynchronous data in the context of an immediate mode GUI library.
EP7 Part B of this video: [ Ссылка ]
This is in continuation of exploratory style videos that am making on Rust. We'll start a new series after this, where we'll start with the language from the very basics.
For context on newsapi crate watch the last 3 videos in the channel.
This video wouldn't have been possible without the amazing people in
the Rust community building high quality libraries. So a big thanks!
Timecode:
0:00 - Intro
0:59 - Recon and wireframe
2:10 - Choosing a GUI library
2:55 - Immediate vs Retained mode APIs
6:09 - Implementation
9:22 - Rendering dummy list of articles
12:22 - Making articles scrollable
14:05 - Adding a custom font
17:25 - Making the news cards look good
19:55 - refactor and cleanups
20:58 - Adding header and footer widget
23:55 - Adding the top panel with controls
26:57 - Closing notes and towards part B
Target audience: Programmers who are new to Rust and want a bird's eye overview of the development experience in Rust.
Links:
Code repository (git tag: ep7a):
[ Ссылка ]
Crates:
iced: [ Ссылка ]
egui: [ Ссылка ]
sixtyfps: [ Ссылка ]
confy: [ Ссылка ]
tracing: [ Ссылка ]
serde: [ Ссылка ]
Good to know:
Immediate vs retained mode API: [ Ссылка ]
The elm architecture: [ Ссылка ]
ImGui: [ Ссылка ]
Cow type: [ Ссылка ]
cargo workspaces: [ Ссылка ]
rust-analyzer: [ Ссылка ]
Range type which implements Iterator trait: [ Ссылка ]
BTreeMap: [ Ссылка ]
----------------------------------------------------------------
This series is aimed at programmers who already have some experience with at
least one imperative language such as Python or C/C++, but are new to Rust.
What is Rust and why should you invest time in learning it?
Rust is the most loved programming language according to the Stack Overflow survey for 6th year in a row (2016-2021).
Read more in the following blog:
[ Ссылка ]
Thanks for watching!
This channel is dedicated in helping people become better at programming.
Social Platforms:
🐤 Twitter: [ Ссылка ]
📒 Github: [ Ссылка ]
📗 Polywork: [ Ссылка ]
🕸️ Blog: [ Ссылка ]
Support:
Patreon: [ Ссылка ]
Ko-fi: [ Ссылка ]
Your support is very much appreciated.
Free and open source software that I use:
🌐 Firefox: [ Ссылка ]
📽️ Open Broadcaster Software: [ Ссылка ]
🎬 Kdenlive: [ Ссылка ]
🎨 GIMP: [ Ссылка ]
🔊 Audacity: [ Ссылка ]
🖌️ MyPaint: [ Ссылка ]
Have a great day :)
![](https://i.ytimg.com/vi/NtUkr_z7l84/maxresdefault.jpg)