Serde derive is a procedural macro. It will run at compile time and transform your program's source code.

Adding serde_derive macro(s) as a dependency

If you have cargo-edit installed, run this command in a terminal, in your project's directory:

cargo add serde_derive

To add it manually, edit your project's Cargo.toml file and add to the [dependencies] section:

serde_derive = "1.0.106"

You may need to import the macro(s) with use serde_derive::*.

Read the serde_derive documentation.

Back to the crate overview.