Rust: Managing a Growing Project

แชร์
ฝัง
  • เผยแพร่เมื่อ 15 ต.ค. 2024

ความคิดเห็น • 12

  • @dyspatch8574
    @dyspatch8574 2 ปีที่แล้ว +8

    Your content is too professional for a channel with 400 subs. You deserve atleast 25K. Great job!

  • @DSaad
    @DSaad ปีที่แล้ว

    Hi Ricky, I watch every day one of your videos before starting to work with my morning coffee. You are so sympathetic and knowledgeable!
    Thanks a lot for the content!

  • @glener1000
    @glener1000 7 หลายเดือนก่อน

    In my project I had to keep everything inside the "src" folder, without any more nesting. Because when there were more nests, the local code worked normally, but in my github actions jobs it gave an error that didn't find the imports...

  • @tylerbunnell8714
    @tylerbunnell8714 ปีที่แล้ว

    What plug-in gives you that yellow line underneath your “mod” definition and the down the left side?

  • @MichaelKefeder
    @MichaelKefeder 2 ปีที่แล้ว

    Very good overview, thanks!

  • @olafbaeyens8955
    @olafbaeyens8955 ปีที่แล้ว +2

    If I understand correctly:
    use crate::xxx.yyy;
    use super::xxx.yyy;
    use self::xxx.yyy;
    Is intended for code within your create itself:.
    When you use crates outside your code you just use
    use :xxx.yyy;
    And specify it in the cargo
    [dependencies]
    xxx = { path = "../xxx"}
    New to Rust and I was convinced that use crate::xxx was intended for code that was in a different crate to point to code in that different crate. Lost many hours with trial and error until I found this post :-)

  • @gustav_spin
    @gustav_spin ปีที่แล้ว

    Amazing!

  • @MartinKariuki-c9k
    @MartinKariuki-c9k 8 หลายเดือนก่อน

    Please provide
    the repo link

  • @iamgabrielsoft5891
    @iamgabrielsoft5891 2 ปีที่แล้ว +2

    Rust rocks 😁

  • @bradkempmusic
    @bradkempmusic 2 ปีที่แล้ว +2

  • @olafbaeyens8955
    @olafbaeyens8955 ปีที่แล้ว

    Something else that is confusing from someone that is coming from another language:
    use crate::xxx.yyy;
    use super::xxx.yyy;
    use self::xxx.yyy;
    "super" and "self" is not what you expect how it behaves.
    When you look at the folder structure then the file is at the same level as your source code and you want to use:.
    use self::xxx.yyy;
    However you need to use instead.
    use super::xxx.yyy;
    Probably because in Rust your filename is also a namespace deeper.
    Most other languages, the filename itself is not part of a namespace but in Rust it is