Compare commits

...

7 Commits

Author SHA1 Message Date
David Tolnay 6140b6f527 Release 1.0.175 2023-07-23 20:07:32 -07:00
David Tolnay 4cabc9f293 Merge pull request #2527 from ankane/license-files
Include license files in serde_derive crate
2023-07-23 20:04:18 -07:00
Andrew Kane aa7c6345a4 Include license files in serde_derive crate 2023-07-23 19:54:57 -07:00
David Tolnay 27414c90a8 Merge pull request #2522 from serde-rs/leak
Leak all memory allocated during macro expansion
2023-07-22 08:37:52 -07:00
David Tolnay 50e2f4b213 Leak all memory allocated during macro expansion 2023-07-22 08:32:18 -07:00
David Tolnay 22be673beb Release 1.0.174 2023-07-20 22:20:37 -07:00
David Tolnay 166c89fabf Opt in to generate-link-to-definition when building on docs.rs 2023-07-20 22:19:03 -07:00
11 changed files with 34 additions and 11 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "serde_derive"
version = "1.0.173"
version = "1.0.175"
authors = ["David Tolnay <dtolnay@gmail.com>"]
publish = false
+18
View File
@@ -2,9 +2,27 @@ extern crate proc_macro2;
use proc_macro2::watt;
use proc_macro2::watt::buffer::InputBuffer;
use std::alloc::{GlobalAlloc, Layout, System};
use std::io::{self, Read, Write};
use std::sync::atomic::Ordering;
struct MonotonicAllocator;
#[global_allocator]
static ALLOCATOR: MonotonicAllocator = MonotonicAllocator;
unsafe impl GlobalAlloc for MonotonicAllocator {
unsafe fn alloc(&self, layout: Layout) -> *mut u8 {
System.alloc(layout)
}
unsafe fn dealloc(&self, _ptr: *mut u8, _layout: Layout) {
// Leak: this cuts 3% of code size from the precompiled macro binary.
// There is no way that serde_derive would fill up all memory on the
// host. When the subprocess exits, operating system will clean this up.
}
}
fn main() {
let mut buf = Vec::new();
io::stdin().read_to_end(&mut buf).unwrap();
+3 -2
View File
@@ -1,13 +1,13 @@
[package]
name = "serde_derive"
version = "1.0.173"
version = "1.0.175"
authors = ["David Tolnay <dtolnay@gmail.com>"]
categories = ["no-std", "no-std::no-alloc"]
description = "Implementation of #[derive(Serialize, Deserialize)]"
documentation = "https://serde.rs/derive.html"
edition = "2015"
homepage = "https://serde.rs"
include = ["serde_derive-x86_64-unknown-linux-gnu", "src"]
include = ["serde_derive-x86_64-unknown-linux-gnu", "src", "LICENSE-APACHE", "LICENSE-MIT"]
keywords = ["serde", "serialization", "no_std", "derive"]
license = "MIT OR Apache-2.0"
readme = "crates-io.md"
@@ -31,5 +31,6 @@ serde = { version = "1", path = "../../serde" }
[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]
rustdoc-args = ["--generate-link-to-definition"]
[workspace]
+1 -1
View File
@@ -13,7 +13,7 @@
//!
//! [https://serde.rs/derive.html]: https://serde.rs/derive.html
#![doc(html_root_url = "https://docs.rs/serde_derive/1.0.173")]
#![doc(html_root_url = "https://docs.rs/serde_derive/1.0.175")]
#![allow(unknown_lints, bare_trait_objects)]
extern crate proc_macro;
+3 -2
View File
@@ -1,6 +1,6 @@
[package]
name = "serde"
version = "1.0.173" # remember to update html_root_url and serde_derive dependency
version = "1.0.175" # remember to update html_root_url and serde_derive dependency
authors = ["Erick Tryzelaar <erick.tryzelaar@gmail.com>", "David Tolnay <dtolnay@gmail.com>"]
build = "build.rs"
categories = ["encoding", "no-std", "no-std::no-alloc"]
@@ -14,7 +14,7 @@ repository = "https://github.com/serde-rs/serde"
rust-version = "1.19"
[dependencies]
serde_derive = { version = "=1.0.173", optional = true, path = "../serde_derive" }
serde_derive = { version = "=1.0.175", optional = true, path = "../serde_derive" }
[dev-dependencies]
serde_derive = { version = "1", path = "../serde_derive" }
@@ -28,6 +28,7 @@ features = ["derive", "rc"]
[package.metadata.docs.rs]
features = ["derive"]
targets = ["x86_64-unknown-linux-gnu"]
rustdoc-args = ["--generate-link-to-definition"]
### FEATURES #################################################################
+1 -1
View File
@@ -93,7 +93,7 @@
////////////////////////////////////////////////////////////////////////////////
// Serde types in rustdoc of other crates get linked to here.
#![doc(html_root_url = "https://docs.rs/serde/1.0.173")]
#![doc(html_root_url = "https://docs.rs/serde/1.0.175")]
// Support using Serde without the standard library!
#![cfg_attr(not(feature = "std"), no_std)]
// Unstable functionality only if the user asks for it. For tracking and
+2 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "serde_derive"
version = "1.0.173" # remember to update html_root_url
version = "1.0.175" # remember to update html_root_url
authors = ["Erick Tryzelaar <erick.tryzelaar@gmail.com>", "David Tolnay <dtolnay@gmail.com>"]
categories = ["no-std", "no-std::no-alloc"]
description = "Macros 1.1 implementation of #[derive(Serialize, Deserialize)]"
@@ -30,3 +30,4 @@ serde = { version = "1", path = "../serde" }
[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]
rustdoc-args = ["--generate-link-to-definition"]
+1 -1
View File
@@ -13,7 +13,7 @@
//!
//! [https://serde.rs/derive.html]: https://serde.rs/derive.html
#![doc(html_root_url = "https://docs.rs/serde_derive/1.0.173")]
#![doc(html_root_url = "https://docs.rs/serde_derive/1.0.175")]
#![allow(unknown_lints, bare_trait_objects)]
// Ignored clippy lints
#![allow(
+1
View File
@@ -21,3 +21,4 @@ syn = { version = "2.0.25", default-features = false, features = ["clone-impls",
[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]
rustdoc-args = ["--generate-link-to-definition"]
+2 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "serde_test"
version = "1.0.173" # remember to update html_root_url
version = "1.0.175" # remember to update html_root_url
authors = ["Erick Tryzelaar <erick.tryzelaar@gmail.com>", "David Tolnay <dtolnay@gmail.com>"]
build = "build.rs"
categories = ["development-tools::testing"]
@@ -25,3 +25,4 @@ doc-scrape-examples = false
[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]
rustdoc-args = ["--generate-link-to-definition"]
+1 -1
View File
@@ -144,7 +144,7 @@
//! # }
//! ```
#![doc(html_root_url = "https://docs.rs/serde_test/1.0.173")]
#![doc(html_root_url = "https://docs.rs/serde_test/1.0.175")]
#![cfg_attr(feature = "cargo-clippy", allow(renamed_and_removed_lints))]
// Ignored clippy lints
#![cfg_attr(feature = "cargo-clippy", allow(float_cmp, needless_doctest_main))]