mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-04-22 20:38:02 +00:00
6882285be0
This makes it slightly more convenient to use the following as a
Reindeer fixup for those that prefer to build from source:
extra_mapped_srcs = { "src/lib_from_source.rs" = "src/lib.rs" }
[platform_fixups.'cfg(all(target_arch = "x86_64", target_os = "linux", target_env = "gnu"))']
extra_deps = [":proc-macro2", ":quote", ":syn"]
as opposed to checking in a whole new file containing the `extern crate
proc_macro` + `include!("lib_from_source.rs")`.
24 lines
700 B
Rust
24 lines
700 B
Rust
//! This crate provides Serde's two derive macros.
|
|
//!
|
|
//! ```edition2021
|
|
//! # use serde_derive::{Deserialize, Serialize};
|
|
//! #
|
|
//! #[derive(Serialize, Deserialize)]
|
|
//! # struct S;
|
|
//! #
|
|
//! # fn main() {}
|
|
//! ```
|
|
//!
|
|
//! Please refer to [https://serde.rs/derive.html] for how to set this up.
|
|
//!
|
|
//! [https://serde.rs/derive.html]: https://serde.rs/derive.html
|
|
|
|
#![doc(html_root_url = "https://docs.rs/serde_derive/1.0.175")]
|
|
#![allow(unknown_lints, bare_trait_objects)]
|
|
|
|
#[cfg(not(all(target_arch = "x86_64", target_os = "linux", target_env = "gnu")))]
|
|
include!("lib_from_source.rs");
|
|
|
|
#[cfg(all(target_arch = "x86_64", target_os = "linux", target_env = "gnu"))]
|
|
include!("lib_precompiled.rs");
|