A Practical Introduction to Derive Macros with Attributes

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

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

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

    I appreciate if you like and subscribe. 😉
    Now we have a Discord server as well: discord.gg/uu8a5GjMg4
    This is rather a follow-up video on the previous derive macros video. If there's anything you don't quite get, it's probably I've already explained it. See the video here: th-cam.com/video/XY0yR6IPbhw/w-d-xo.html
    This video wasn't possible without Árpád's help. He's also available on Twitter: twitter.com/H2CO3_iOS
    🙃 Just like me: twitter.com/_erayerdin
    If you've got any question, you can reply me here as well. I've covered the basics of macros in Rust, so maybe you can give me some ideas about the next video. 😕

  • @sohn7767
    @sohn7767 ปีที่แล้ว +11

    Great work! There really is lack of resources that teach this thing. Learning this stuff by oneself was painful personally

    • @_schwm
      @_schwm  ปีที่แล้ว +3

      I was trying to get it all together into a coherent context. 😊 Thanks for your kind comment.

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

    Excellent video, thank you

  • @ihgnmah
    @ihgnmah ปีที่แล้ว +1

    Great explanation. Please keep up the good work.

    • @_schwm
      @_schwm  ปีที่แล้ว +1

      Thank you!

  • @LinhTran-yg7fe
    @LinhTran-yg7fe 11 หลายเดือนก่อน +1

    Thank you. I’m waiting for the function macros

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

    Waiting for your next video. Amazing, quality video

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

      Thank you so much 😀

  • @_emnljrz
    @_emnljrz ปีที่แล้ว +1

    Great work! Can you also post the tutorial code in git repo, it's nice to hear the tutorial while following the code for better understanding. Thank you.

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

      I'll be doing that when I have a leisure. Thanks for the feedback. 😊

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

    thank you ❤ very very informative. I wanted to learn especially the proc-macro2 part.👏🏻regards

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

      Welcome. 😊

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

    first of all great video, i have one question where you said on 11:45 you said we should use fully qualified paths which i understand my question is you showed us with the standard library but what about third party creates because the code in the quote macro has only access to the create in the user project which means the use has to import the the third party create how would you fixed that my approach would be going form my own macro to the function but that doesnt work i think because it is a proc macro if it could work how would you do that

  • @sohn7767
    @sohn7767 ปีที่แล้ว +1

    What are your thoughts on the darling crate? Its purpose is similar to that of deluxe

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

      I believe deluxe's readme answer the question: github.com/jf2048/deluxe#related-crates
      Haven't tried darling myself, have no idea about it. According to deluxe's readme, darling seems to parse syn::Meta directly instead of TokenStream, thus they say it's restricted to parse meta syntax and nothing beyond. Take their word for it. 🤷

  • @eps-nx8zg
    @eps-nx8zg 10 หลายเดือนก่อน

    Honestly using a ton of crates to do everything for you doesnt really teach anything.

    • @ougonce
      @ougonce 10 หลายเดือนก่อน +2

      It teaches the important part, which is accomplishing your goal. There's no merit or honor in pretending libraries don't exist.