#typst #derive

macro derive_typst_intoval

Derive typst::IntoValue for structs

5 releases (breaking)

0.6.0 Oct 27, 2025
0.5.0 Aug 19, 2025
0.3.0 Nov 4, 2024
0.2.1 May 12, 2024
0.1.0 May 11, 2024

#2893 in Procedural macros

Download history 372/week @ 2025-09-18 322/week @ 2025-09-25 213/week @ 2025-10-02 359/week @ 2025-10-09 263/week @ 2025-10-16 390/week @ 2025-10-23 159/week @ 2025-10-30 120/week @ 2025-11-06 169/week @ 2025-11-13 198/week @ 2025-11-20 286/week @ 2025-11-27 552/week @ 2025-12-04 2286/week @ 2025-12-11 1602/week @ 2025-12-18 759/week @ 2025-12-25 1071/week @ 2026-01-01

6,165 downloads per month
Used in typst-as-lib

MIT/Apache

27KB
135 lines

derive_typst_intoval CI (Docs.rs) (Crates.io status)

A small derive macro to derive IntoValue for structs. I mainly use it myself to pack up the data for typst's inputs.

FAQ

  • What about enums?

Status

Maintained.

Contributing

I'd love contributions, comments, praise, criticism... You could open an issue or a pull request.

CoC

Wherever applicable, this project follows the rust code of conduct.

Dependencies

~79MB
~1M SLoC