6 releases

Uses old Rust 2015

0.2.1 Sep 8, 2019
0.2.0 Nov 19, 2018
0.1.3 Nov 4, 2017
0.1.2 Jul 28, 2017
0.1.0 Oct 5, 2016

#1912 in Rust patterns

Download history 9542/week @ 2025-11-14 7944/week @ 2025-11-21 6330/week @ 2025-11-28 10284/week @ 2025-12-05 7161/week @ 2025-12-12 4462/week @ 2025-12-19 3448/week @ 2025-12-26 7363/week @ 2026-01-02 11026/week @ 2026-01-09 9925/week @ 2026-01-16 13878/week @ 2026-01-23 14129/week @ 2026-01-30 15271/week @ 2026-02-06 19897/week @ 2026-02-13 19000/week @ 2026-02-20 20935/week @ 2026-02-27

78,247 downloads per month
Used in 54 crates (16 directly)

Apache-2.0/MIT

8KB
73 lines

defmac

Please read the API documentation here__

__ https://docs.rs/defmac

|build_status|_ |crates|_

.. |build_status| image:: https://travis-ci.org/bluss/defmac.svg .. _build_status: https://travis-ci.org/bluss/defmac

.. |crates| image:: http://meritbadge.herokuapp.com/defmac .. _crates: https://crates.io/crates/defmac

Recent Changes

  • 0.2.1

    • Fix so that the macro can be used through its full path (like defmac::defmac! { .. }
    • Fix so that the macro can expand at module level
  • 0.2.0

    • New implementation that is general and variadic: defmac now supports making macros with arbitrarily many parameters!
    • Requires Rust 1.20
  • 0.1.3

    • Update docs with another example and a tip about syntactical variable capture.

License

Dual-licensed to be compatible with the Rust project.

Licensed under the Apache License, Version 2.0 http://www.apache.org/licenses/LICENSE-2.0 or the MIT license http://opensource.org/licenses/MIT, at your option. This file may not be copied, modified, or distributed except according to those terms.

No runtime deps