floats iter 1.4: refresh canonical.rs 'no floats' doc comment

This commit is contained in:
2026-05-10 14:47:43 +02:00
parent 7c95a69780
commit 1a4e2f04b7
+8 -3
View File
@@ -9,9 +9,14 @@
//! The single entry point is [`to_bytes`]. This module deliberately
//! does **not** parse, validate, or hash — it only emits bytes. It also
//! does not attempt to be a general-purpose canonical-JSON library;
//! number-formatting follows whatever `serde_json::Number::to_string`
//! does, which is fine for the AILang AST (integers and short strings;
//! no floats).
//! Number formatting follows whatever `serde_json::Number::to_string`
//! does — used only for the AST integer literals. Float literals do
//! not go through the number path; [`crate::ast::Literal::Float`]
//! carries its IEEE-754 bit pattern as a `u64` and serialises via a
//! 16-character lowercase hex *string*, which the canonical writer
//! treats like any other string. The string path is what makes float
//! canonical bytes bit-stable across `serde_json` versions and what
//! lets NaN / ±Inf round-trip at all (they cannot, as JSON numbers).
//!
//! # Examples
//!