7 releases (stable)

1.1.1 Nov 11, 2024
1.1.0 Aug 17, 2023
1.0.3 Aug 16, 2023
0.1.0 Aug 16, 2023

#369 in Procedural macros

Download history 52/week @ 2024-11-01 122/week @ 2024-11-08 25/week @ 2024-11-15 262/week @ 2024-11-22 1207/week @ 2024-11-29 61/week @ 2024-12-06 18/week @ 2024-12-13 235/week @ 2024-12-20 10/week @ 2024-12-27 9/week @ 2025-01-03

404 downloads per month

MIT license

7KB
92 lines

clown

Crate Info API Docs

An approximation of "capture-by-clone" lambdas in Rust.
Requires nightly and #![feature(proc_macro_hygiene, stmt_expr_attributes)]

Turns this:

#[clown] || do_call(honk!(foo.bar), slip!(baz.bop))

into this:

{
    let __honk_0 = (foo.bar).clone();
	let __slip_0 = baz.bop;
    move || do_call(__honk_0, __slip_0)
}

Dependencies

~0.7–1.1MB
~25K SLoC