![iced-rs](/img/default-banner.jpg)
- Видео 1
- Просмотров 48 827
iced-rs
Испания
Добавлен 23 сен 2023
A cross-platform GUI library for Rust focused on simplicity and type-safety. Inspired by Elm.
Building a simple text editor with iced, a cross-platform GUI library for Rust
Learn the basics of iced-a cross-platform GUI library for Rust-and build a cool, simple text editor in the process!
00:00:00 Introduction
00:02:04 Initial setup
00:03:59 Hello, iced!
00:11:00 Multi-line text input
00:15:53 The debug view
00:17:46 Dark theme and cursor indicator
00:21:14 Async file loading
00:31:07 Native file picker
00:38:04 File path tracking
00:42:46 New and save interactions
00:53:26 Font loading and custom icons
01:02:22 Tooltips and styling
01:05:01 Syntax highlighting
01:09:12 Theme picker
01:12:55 Subscriptions and save hotkey
00:00:00 Introduction
00:02:04 Initial setup
00:03:59 Hello, iced!
00:11:00 Multi-line text input
00:15:53 The debug view
00:17:46 Dark theme and cursor indicator
00:21:14 Async file loading
00:31:07 Native file picker
00:38:04 File path tracking
00:42:46 New and save interactions
00:53:26 Font loading and custom icons
01:02:22 Tooltips and styling
01:05:01 Syntax highlighting
01:09:12 Theme picker
01:12:55 Subscriptions and save hotkey
Просмотров: 48 868
Someone recommended Iced to me for my project and it looked perfect. My project, funny enough, is a text editor (with a twist!) so this will definitely help kickstart my progress. Great to find this :)
Great Video!! Thanks for the tutorial it really helped. Is there any way to add highlighter for a custom language or custom syntax highlighting? If you could share any resource on this- that would be really helpful.
The theme part is a bit tricky. I completely relied on the video for that. It would be better if you could provide some documentation for it.
I root for the success of iced so much, IMO it has the best development ergonomics in the entire rust GUI ecosytem. Thanks for the video and for all the hardwork!
Excuse me, how can I set an icon for the app?
does this toolkit have UI files? like .ui in GTK or .axaml in Avalonia?
I have been using Egui and Slint UI tools for Rust, and have long looked at iced. This video makes a strong case for switching !
I followed the code snap and got tokio error "there is no reactor running, must be called from the context of a Tokio 1.x runtime", anyone can help me? thanks
modify the dependencies to 'iced = {version = "0.12.1", features = ["debug", "tokio"]}'
this might very well be the most useful video i've ever watched. definitely a great way to spend an hour and a half
You make it look so easy
Great video! I'm in love with this font, what's its name?
The one I use in my terminal is called Hasklig, although I use the Nerd Font variant: Hasklug Nerd Font.
How could I implement line numbering? I've tried a few things, but the issue is I can't clone/modify a Content arbitrarily or track things like scroll effectively. It also doesn't seem like it's possible built-in. I tried cloning iced and modifying the editor to add a ".numbered()" function, but even then I couldn't figure it out as the rendering code was too complicated for me to understand.
I just wanna say, excellent tutorial! Everything was very clear and easy to understand, and I made my first iced app with this. Thanks for the hard work!
the debug feature prints number all over the window... is there a bug? Love you work!
I've devoted about a year to egui, and at work we use Tauri for alot our applications (mostly because we wanted to reuse React code). But damn, Iced is clean, if that documentation was even somewhat existent, this would absolutely take off.
WE RECIEVE IT fOR UGANDA TOO
It might be useful to mention that the code shown already creates a minimize, maximize and close button on most platforms.. it is just that the presenter chose to use a windowing system with their OS which doesn't show those items 😂
I'm tryna learn this as beginner. But docs aren't ready. I'm just looking at the examples and here and there. Which works kinda but slow. Docs with some projects around would be great
Indeed. The project isn't ready for beginners yet! Docs (and more) are coming.
Hows the progress coming along? :)
i want to like this project, i just can't because the docs are absolute trash. i have to watch a video to find that Sandbox is more suitable for "getting started" than Application, which the examples are in. hard pass.
i also want to note that being deaf and having to *watch* documentation is asinine because the automatic captions cover the text you're typing, AND they are awful on their own so... way to be accessible?
@@lareamondmobile Being deaf doesn't give you the right to be entitled and ungrateful. This library is a gift, and I want to remind you that you simply do not have to use it. No one is forcing you. In any case, if you are so annoyed by watching a video, maybe you could have digged a bit and realize that we actually have an API reference in docs.rs Here's Application: docs.rs/iced/latest/iced/application/trait.Application.html > An Application can execute asynchronous actions by returning a Command in some of its methods. If you do not intend to perform any background work in your program, the Sandbox trait offers a simplified interface. Here's Sandbox: docs.rs/iced/latest/iced/trait.Sandbox.html > A sandboxed Application. If you are a just getting started with the library, this trait offers a simpler interface than Application. We also have a Discord server were we gladly help new users: discord.gg/3xZJ65GAhd You will have to learn to be grateful first, though. Good luck with that!
Does it support docking?
Awesome, will be using your framework from now on. Looking forward to it! :)
I'm hooked!
just spent > year working on tui/ratatui. This is architecturally very similar, the difference being that tui uses text mode rendering, iced uses gui mode
Thank you for this great demo!
Great content and very didactic to help me chose iced over egui.
Hi , I'm running into an error when trying to run the hello iced program , its a huge error and some of it is - Warning: .drectve `-exclude-symbols:"_ZN4core3f3221_$LT$impl$u20$f32$GT$5recip17hc7eaa3f780a7c681E" ' unrecognized Warning: .drectve `-exclude-symbols:"_ZN4core3f6421_$LT$impl$u20$f64$GT$5clamp17h9dbd97e6a763663eE" ' unrecognized Warning: .drectve `-exclude-symbols:"_ZN4core3f6421_$LT$impl$u20$f64$GT$5recip17h7de1cdf1c3c7de97E" ' unrecognized Warning: .drectve `-exclude-symbols:"_ZN4core3ptr24drop_in_place$LT$f32$GT$17he5b9c7b8351adc52E" ' unrecognized Warning: .drectve `-exclude-symbols:"_ZN4core3ptr24drop_in_place$LT$f64$GT$17h2259dc25612ce007E" ' unrecognized Warning: .drectve `-exclude-symbols:"_ZN4core3ptr24drop_in_place$LT$i32$GT$17hf14986fdb0042c92E" ' unrecognized Warning: .drectve `-exclude-symbols:"_ZN4core3ptr24drop_in_place$LT$i64$GT$17h42c40cf9390ac02fE" ' unrecognized Warning: .drectve `-exclude-symbols:"_ZN4core3ptr24drop_in_place$LT$u32$GT$17he34148d1c02f7de9E" ' unrecognized Warning: .drectve `-exclude-symbols:"_ZN4core3ptr42drop_in_place$LT$glam..f32..vec2..Vec2$GT$17h8c86906fb96985e6E" ' unrecognized Warning: .drectve `-exclude-symbols:"_ZN4core3ptr44drop_in_place$LT$glam..f64..dmat2..DMat2$GT$17h2f19f8e90a49df65E" ' unrecognized Warning: .drectve `-exclude-symbols:"_ZN4core3ptr44drop_in_place$LT$glam..f64..dvec2..DVec2$GT$17h3b0a93fcad586716E" ' unrecognized Warning: .drectve `-exclude-symbols:"_ZN4core3ptr48drop_in_place$LT$glam..f32..sse2..mat2..Mat2$GT$17h8d18ce4327635d82E" ' unrecognized Warning: .drectve `-exclude-symbols:"_ZN4core3ptr48drop_in_place$LT$glam..f32..sse2..vec4..Vec4$GT$17h6d086dfe3c3bed30E" ' unrecognized Warning: .drectve `-exclude-symbols:_ZN4glam4sse24dot317hd392e722cb34ff55E ' unrecognized Warning: .drectve `-exclude-symbols:_ZN4glam4sse24dot417h4e19fe6b2d23ff48E ' unrecognized Warning: corrupt .drectve at end of def file Warning: corrupt .drectve at end of def file Warning: corrupt .drectve at end of def file Warning: corrupt .drectve at end of def file Warning: corrupt .drectve at end of def file Please help with this
Please make documentation, we are all very much waiting, and it would be very cool if once a week would be released some tutorial on the example of a small project, thank you very much!👍👍👍
Thank you so much for this video, I'm just starting with Rust, app development and Iced all at once and this video has been definitely very helpful! Hopefully more to come!
Fantastic tutorial! I learned a lot. Thanks!
Alright fellas load_file keeps throwing this error "functions in traits cannot be declared `async`" anyone seen a resolution for this problem?
If suppose someone made notes while learning and shared. Would that help later on with docs? Just asking.
Amazing work!
Please make more tutorials
Question. Where did the "text_editor" vanish too? Checked the crate code and it is no longer there. Version 0.10.0 Can't find it on version 0.9.0 either.
As I point out in the video, the text editor widget hasn't been released yet. You can either use it by relying on the `master` branch or the `text-editor` tag of the official repository.
@@iced-rs My bad. I misread the code. Derp! Thought that the "text_input" was a widget in the Iced crate. Sorry.
How did you have a pop up terminal at 3:30? Is that through helix or zellij?
i wondered the same... i think it's via zellij: ctrl+p w
@@qtfimik42ctrl+shift+c, You can set default terminal from settings
Hector and ice goes well together
Really had fun learning with your video, with the amount of things I have learned, I am going to try to make something myself. Looking forward to more such tutorials <3
What are some good resources i could look into for using WASM to get this to run online? I'm trying to make a little editor for my org files
What linux is that
Arch Linux.
I LOVE IT
thank you hector
Didn't even know you guys had a channel, nice
This was perfect thank you! I'm new to rust and was interested in building an editor as way to learn. I hope you do more. Also love Iced so far!
Thanks for this!
Nice video! How did you get a terminal inside helix btw :)
It's a floating pane of my terminal multiplexer, Zellij: zellij.dev/ Also built with Rust!
@@iced-rs :0 thank you!
ahhh yes, the most complete ui-framework
I love you.
love the tutorial. just the level of detail I need to get started
Thanks for that. Please do a video about multi screen applications. Maybe enhance the text editor with a markdown preview dialog or something. Also the fonts field is not available in iced stable or master branch. How to use icon buttons using stable iced version? EDIT: Got it: font::load(include_bytes!("path/to/icons.ttf").as_slice())
Multi-window support hasn't landed yet, but it is scheduled for the next release!
I know. I meant multi screen. Different screens in one window.
Hope that the text editor widget can be launched on stablized versions