Rust Power Tools (MEAP V01)
Sam Van Overmeire
Rust Power Tools is a comprehensive guide to creating macros in Rust. You’ll start your journey with declarative macros, then quickly move on to the powerful procedural macros to build your own domain-specific language. Learn how to create public fields, work with custom attributes, integrate your macros with other crates, write effective tests to ensure your macros are reliable and bug-free, and even share your macros with other developers
Supercharge your code with macros—the real power tools of the Rust programming language!
Macros are instructions to generate new Rust code at compile-time, saving you hours of tedious code writing. The top Rust developers have built macros into everything from the standard library to crates. Now you can learn how these amazing “power tools” will help you push Rust to its full potential. This hands-on guide takes you from the absolute basics to advanced macro techniques.
Inside Rust Power Tools you’ll discover:
• Writing declarative macros
• Procedural macros
• Reading and debugging macro code
• Improving the type system with newtypes and zero-sized types
• How common Rust libraries use macros
Rust Power Tools teaches you how to write, test, debug, and publish macros for Rust. It’s perfect for Rust practitioners who want to master this powerful development technique. In this unique book, you’ll explore Rust macros through interesting and engaging examples, including automatically generating a ‘builder’ and composing a DSL for writing Infrastructure as Code.
Supercharge your code with macros—the real power tools of the Rust programming language!
Macros are instructions to generate new Rust code at compile-time, saving you hours of tedious code writing. The top Rust developers have built macros into everything from the standard library to crates. Now you can learn how these amazing “power tools” will help you push Rust to its full potential. This hands-on guide takes you from the absolute basics to advanced macro techniques.
Inside Rust Power Tools you’ll discover:
• Writing declarative macros
• Procedural macros
• Reading and debugging macro code
• Improving the type system with newtypes and zero-sized types
• How common Rust libraries use macros
Rust Power Tools teaches you how to write, test, debug, and publish macros for Rust. It’s perfect for Rust practitioners who want to master this powerful development technique. In this unique book, you’ll explore Rust macros through interesting and engaging examples, including automatically generating a ‘builder’ and composing a DSL for writing Infrastructure as Code.
Categorias:
Ano:
2023
Edição:
Chapters 1 to 3 of 11
Editora:
Manning Publications
Idioma:
english
Páginas:
70
ISBN 10:
1633437493
ISBN 13:
9781633437494
Arquivo:
PDF, 756 KB
IPFS:
,
english, 2023