iced-rs
iced-rs
  • Видео 1
  • Просмотров 48 827
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
Просмотров: 48 868

Видео

Комментарии

  • @departuream1440
    @departuream1440 2 дня назад

    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 :)

  • @smashedpotato278
    @smashedpotato278 Месяц назад

    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.

  • @shastri3303
    @shastri3303 Месяц назад

    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.

  • @program7592
    @program7592 Месяц назад

    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!

  • @huairuo
    @huairuo 2 месяца назад

    Excuse me, how can I set an icon for the app?

  • @VBB9999
    @VBB9999 2 месяца назад

    does this toolkit have UI files? like .ui in GTK or .axaml in Avalonia?

  • @jamesb1559
    @jamesb1559 2 месяца назад

    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 !

  • @daodongdu3998
    @daodongdu3998 2 месяца назад

    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

    • @edema3763
      @edema3763 2 месяца назад

      modify the dependencies to 'iced = {version = "0.12.1", features = ["debug", "tokio"]}'

  • @auralluring
    @auralluring 2 месяца назад

    this might very well be the most useful video i've ever watched. definitely a great way to spend an hour and a half

  • @henrispriet9812
    @henrispriet9812 3 месяца назад

    You make it look so easy

  • @swordelf4689
    @swordelf4689 4 месяца назад

    Great video! I'm in love with this font, what's its name?

    • @iced-rs
      @iced-rs 4 месяца назад

      The one I use in my terminal is called Hasklig, although I use the Nerd Font variant: Hasklug Nerd Font.

  • @DylanMatthewTurner
    @DylanMatthewTurner 4 месяца назад

    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.

  • @mrmaymanalt
    @mrmaymanalt 4 месяца назад

    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!

  • @fabiozucconi7068
    @fabiozucconi7068 5 месяцев назад

    the debug feature prints number all over the window... is there a bug? Love you work!

  • @thebashpotato
    @thebashpotato 5 месяцев назад

    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.

  • @frostedson9317
    @frostedson9317 5 месяцев назад

    WE RECIEVE IT fOR UGANDA TOO

  • @Ryco117
    @Ryco117 5 месяцев назад

    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 😂

  • @niamotullah99
    @niamotullah99 5 месяцев назад

    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

    • @iced-rs
      @iced-rs 5 месяцев назад

      Indeed. The project isn't ready for beginners yet! Docs (and more) are coming.

    • @Vancha112
      @Vancha112 3 месяца назад

      Hows the progress coming along? :)

  • @lareamondmobile
    @lareamondmobile 6 месяцев назад

    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.

    • @lareamondmobile
      @lareamondmobile 6 месяцев назад

      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?

    • @iced-rs
      @iced-rs 5 месяцев назад

      @@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!

  • @parallelno
    @parallelno 6 месяцев назад

    Does it support docking?

  • @krabat6117
    @krabat6117 6 месяцев назад

    Awesome, will be using your framework from now on. Looking forward to it! :)

  • @workflowinmind
    @workflowinmind 6 месяцев назад

    I'm hooked!

  • @paulmoore7964
    @paulmoore7964 6 месяцев назад

    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

  • @brucebotes9075
    @brucebotes9075 6 месяцев назад

    Thank you for this great demo!

  • @FabianVilersBe
    @FabianVilersBe 7 месяцев назад

    Great content and very didactic to help me chose iced over egui.

  • @kamalnayanpathak2815
    @kamalnayanpathak2815 7 месяцев назад

    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

  • @tracer4278
    @tracer4278 7 месяцев назад

    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!👍👍👍

  • @mariinkys
    @mariinkys 7 месяцев назад

    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!

  • @swez4587
    @swez4587 7 месяцев назад

    Fantastic tutorial! I learned a lot. Thanks!

  • @TheD3adlysin
    @TheD3adlysin 7 месяцев назад

    Alright fellas load_file keeps throwing this error "functions in traits cannot be declared `async`" anyone seen a resolution for this problem?

  • @akza0729
    @akza0729 8 месяцев назад

    If suppose someone made notes while learning and shared. Would that help later on with docs? Just asking.

  • @undefined_x00
    @undefined_x00 8 месяцев назад

    Amazing work!

  • @DiscoveringComputers
    @DiscoveringComputers 8 месяцев назад

    Please make more tutorials

  • @hawke1133
    @hawke1133 8 месяцев назад

    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.

    • @iced-rs
      @iced-rs 8 месяцев назад

      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.

    • @hawke1133
      @hawke1133 8 месяцев назад

      @@iced-rs My bad. I misread the code. Derp! Thought that the "text_input" was a widget in the Iced crate. Sorry.

  • @EDToasty
    @EDToasty 8 месяцев назад

    How did you have a pop up terminal at 3:30? Is that through helix or zellij?

    • @qtfimik42
      @qtfimik42 7 месяцев назад

      i wondered the same... i think it's via zellij: ctrl+p w

    • @sanjeevshrestha5049
      @sanjeevshrestha5049 5 месяцев назад

      @@qtfimik42ctrl+shift+c, You can set default terminal from settings

  • @echoptic775
    @echoptic775 8 месяцев назад

    Hector and ice goes well together

  • @starlordcodes
    @starlordcodes 8 месяцев назад

    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

  • @joshuajones2643
    @joshuajones2643 8 месяцев назад

    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

  • @frankstrea2786
    @frankstrea2786 8 месяцев назад

    What linux is that

    • @iced-rs
      @iced-rs 8 месяцев назад

      Arch Linux.

  • @hanamjaa
    @hanamjaa 9 месяцев назад

    I LOVE IT

  • @xbz24
    @xbz24 9 месяцев назад

    thank you hector

  • @yds6268
    @yds6268 9 месяцев назад

    Didn't even know you guys had a channel, nice

  • @yournamehasbeentaken9752
    @yournamehasbeentaken9752 9 месяцев назад

    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!

  •  9 месяцев назад

    Thanks for this!

  • @Kfoo-dj4md
    @Kfoo-dj4md 9 месяцев назад

    Nice video! How did you get a terminal inside helix btw :)

    • @iced-rs
      @iced-rs 9 месяцев назад

      It's a floating pane of my terminal multiplexer, Zellij: zellij.dev/ Also built with Rust!

    • @Kfoo-dj4md
      @Kfoo-dj4md 9 месяцев назад

      @@iced-rs :0 thank you!

  • @PragandSens
    @PragandSens 9 месяцев назад

    ahhh yes, the most complete ui-framework

  • @letronix6243
    @letronix6243 9 месяцев назад

    I love you.

  • @el_carbonara
    @el_carbonara 9 месяцев назад

    love the tutorial. just the level of detail I need to get started

  • @mehrnehmen
    @mehrnehmen 10 месяцев назад

    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())

    • @iced-rs
      @iced-rs 9 месяцев назад

      Multi-window support hasn't landed yet, but it is scheduled for the next release!

    • @mehrnehmen
      @mehrnehmen 9 месяцев назад

      I know. I meant multi screen. Different screens in one window.

  • @steamedeggeggegg
    @steamedeggeggegg 10 месяцев назад

    Hope that the text editor widget can be launched on stablized versions