1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
[]
= "libfreeform"
= "Parser for Apple Freeform pasteboard data: PencilKit ink, the CRLNativeData object graph, and the TSUDescription manifest"
= ["freeform", "apple", "pasteboard", "pencilkit", "parser"]
= ["parser-implementations"]
= "README.md"
= "https://docs.rs/libfreeform"
= "1.0.0"
= "2024"
= "1.85"
= "MIT OR Apache-2.0"
= "https://github.com/can1357/libfreeform"
= [
"/Cargo.toml",
"/README.md",
"/LICENSE-APACHE",
"/LICENSE-MIT",
"/src/**",
"/libfreeform-wasm/**",
"/fixtures/**",
]
[]
# Native builds expose the normal Rust library. wasm builds use the same crate
# as a cdylib; `libfreeform-wasm/lib.rs` is compiled only for that target.
= ["rlib", "cdylib"]
[]
= []
## Derive `serde::{Serialize, Deserialize}` (camelCase field names) on all
## decoded data types.
= ["dep:serde"]
## Compile wasm-bindgen exports when building this crate for wasm32. This
## feature is intentionally inert on native targets so `--all-features` stays
## useful for the rlib test and lint matrix.
= ["serde", "dep:serde-wasm-bindgen", "dep:wasm-bindgen"]
[]
= { = "1", = ["derive"], = true }
[]
= { = "0.6", = true }
# Pinned exactly: the wasm-bindgen CLI that post-processes the cdylib must
# match this version (see npm/build.mjs and .github/workflows).
= { = "=0.2.126", = true }
[]
= { = "1", = ["derive"] }
= "1"
# Small, fast wasm: the npm artifact is built from this profile.
[]
= 3
= true
= 1
= "debuginfo"
= "abort"
[]
= true
[]
# ──────────────────────────────────────────────────────────────────────────────
# Base Lint Levels
# ──────────────────────────────────────────────────────────────────────────────
= { = "warn", = -1 }
= { = "deny", = -1 }
= { = "warn", = -1 }
= { = "warn", = -1 }
= { = "warn", = -1 }
= { = "warn", = -1 }
= { = "deny", = -1 }
# ──────────────────────────────────────────────────────────────────────────────
# Meta: Lint Attributes
# ──────────────────────────────────────────────────────────────────────────────
= "warn" # Enforce reason for all #[allow]
# ──────────────────────────────────────────────────────────────────────────────
# Safety & Unsafe Code
# ──────────────────────────────────────────────────────────────────────────────
= "warn"
# ──────────────────────────────────────────────────────────────────────────────
# Numeric Casts & Conversions
# ──────────────────────────────────────────────────────────────────────────────
= "allow" # u32 as u64 - 'as' is cleaner than From
= "allow" # u64 as u32 - often intentional
= "allow" # u32 as i32 - can be intentional
= "allow" # f64 as f32 - sometimes acceptable
= "allow" # i32 as u32 - sometimes needed
= "allow" # Non-Into conversion is more clear
# ──────────────────────────────────────────────────────────────────────────────
# Floating Point
# ──────────────────────────────────────────────────────────────────────────────
= "allow" # Tests mostly do this + we know what we're doing
= "allow" # mul_add changes rounding; decoders must stay bit-stable
# ──────────────────────────────────────────────────────────────────────────────
# Functions & Closures
# ──────────────────────────────────────────────────────────────────────────────
= "allow" # Needed for performance-critical code
= "allow" # Not every function needs #[must_use]
= "allow"
= "allow" # .map(ToString::to_string) can be clearer
= "allow" # Builder pattern methods
# ──────────────────────────────────────────────────────────────────────────────
# Structs & Types
# ──────────────────────────────────────────────────────────────────────────────
= "allow"
= "allow" # Not every field needs to be in Debug output
= "allow" # Usually with builders
# ──────────────────────────────────────────────────────────────────────────────
# Pattern Matching
# ──────────────────────────────────────────────────────────────────────────────
= "allow" # Can be intentional for clarity
= "allow" # _ can be clearer than listing variants
= "allow" # match/if-let-else often clearer
# ──────────────────────────────────────────────────────────────────────────────
# Imports & Module Organization
# ──────────────────────────────────────────────────────────────────────────────
= "allow"
= "allow" # Sometimes more readable
= "allow" # Cleaner for preludes and test modules
# ──────────────────────────────────────────────────────────────────────────────
# Variables & Type Inference
# ──────────────────────────────────────────────────────────────────────────────
= "allow" # Type obvious from context
= "allow" # 'req' and 'res' together are fine
# ──────────────────────────────────────────────────────────────────────────────
# Literals & Formatting
# ──────────────────────────────────────────────────────────────────────────────
= "allow" # 10_000_000 vs 0xDEADBEEF is context dependent
= "allow" # Explicit bit patterns can be clearer than hex
# ──────────────────────────────────────────────────────────────────────────────
# Code Style
# ──────────────────────────────────────────────────────────────────────────────
= "allow" # Default::default() sometimes clearer
= "allow" # We pay attention to this already
# ──────────────────────────────────────────────────────────────────────────────
# Documentation
# ──────────────────────────────────────────────────────────────────────────────
= "allow" # Documenting every error return is often redundant
= "allow" # Not every panic needs docs, especially assert!
# ──────────────────────────────────────────────────────────────────────────────
# Complexity
# ──────────────────────────────────────────────────────────────────────────────
= "allow" # Arbitrary limits don't account for necessary complexity