Skip to content

Atliac/rust-macros-tutorial

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rust Macros Tutorial

A comprehensive guide to mastering macros in Rust, from basic concepts to advanced techniques.

📖 Overview

Welcome to the Rust Macros Tutorial! This guide is a hands-on, interactive way to learn about Rust's powerful metaprogramming system. You will learn about declarative macros (macro_rules!) and all three types of procedural macros: Derive, Attribute, and Function-like. Through editable code examples, you'll discover how to use macros for code generation and domain-specific abstractions, while learning best practices for safety and maintainability.

💻 Prerequisites

  • Basic knowledge of Rust syntax
  • Understanding of functions, closures, and generics
  • Familiarity with Cargo and basic project structure

🛠️ Getting Started

  1. Clone this repository
  2. Navigate to the book directory
  3. Run mdbook serve to start the local documentation server
  4. Open your browser to http://localhost:3000

🌐 Live Documentation

Visit the online version at https://books.atliac.com/rust-macros-tutorial/

🤝 Contributing

Contributions are welcome! Please feel free to submit pull requests or open issues.

📝 License

This project is dual-licensed under the MIT License and the Apache License, Version 2.0.

🙏 Acknowledgments

Thanks to the Rust community and all the excellent resources that made this tutorial possible.


Happy macro programming! 🦀

About

Rust Macros Tutorial

Topics

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors