From cb955d82951a9c2148659fa8bd72caaf2e7a4e2e Mon Sep 17 00:00:00 2001 From: Jonathan 'theJPster' Pallant Date: Sun, 4 Jan 2026 14:18:31 +0000 Subject: [PATCH] Clean up features, and get docs.rs to enable the useful ones --- Cargo.toml | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 568b822..b6e4c04 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -19,6 +19,7 @@ cc = "1.0" [features] default = ["all"] +# should enable all libc functions gated behind features all = [ "abs", "atoi", @@ -53,8 +54,8 @@ all = [ "utoa", ] +# libc functions gated behind features abs = [] -alloc = [] atoi = [] isalpha = [] isdigit = [] @@ -65,9 +66,6 @@ memchr = [] qsort = [] rand_r = [] rand = ["rand_r", "dep:portable-atomic"] -rand_max_i16 = [] -signal = ["dep:portable-atomic"] -signal-cs = ["portable-atomic/critical-section"] snprintf = [] strcat = [] strchr = [] @@ -88,3 +86,18 @@ strtoul = [] strtoull = [] strtoumax = [] utoa = [] + +# options for rand +rand_max_i16 = [] + +# malloc/free support +alloc = [] + +# Signal support is optional because it requires atomics +signal = ["dep:portable-atomic"] +# bring in critical-section based portable atomics +signal-cs = ["portable-atomic/critical-section"] + +[package.metadata.docs.rs] +# Features to pass to Cargo (default: []) +features = ["all", "alloc", "signal"]