compact binary serialization format with built-in compression

docs: clarify and correct some issues

also pin versions to at least minor, oops

kokirigla.de 1ff20e66 227dcf0c

verified
Changed files
+44 -30
.tangled
workflows
docs
+1 -1
.tangled/workflows/ci.yml
···
- name: "Install rust toolchain"
command: "rustup install 1.89"
-
# when changing these steps make sure `Justfile` remains in-sync
+
# when changing these steps make sure `justfile` remains in-sync
- name: "Check (without default features)"
command: "cargo check --no-default-features"
- name: "Check"
+32 -21
Cargo.lock
···
checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa"
[[package]]
-
name = "android-tzdata"
-
version = "0.1.1"
-
source = "registry+https://github.com/rust-lang/crates.io-index"
-
checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0"
-
-
[[package]]
name = "android_system_properties"
version = "0.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
···
[[package]]
name = "chrono"
-
version = "0.4.41"
+
version = "0.4.42"
source = "registry+https://github.com/rust-lang/crates.io-index"
-
checksum = "c469d952047f47f91b68d1cba3f10d63c11d73e4636f24f08daf0278abf01c4d"
+
checksum = "145052bdd345b87320e369255277e3fb5152762ad123a901ef5c262dd38fe8d2"
dependencies = [
-
"android-tzdata",
"iana-time-zone",
"js-sys",
"num-traits",
"wasm-bindgen",
-
"windows-link",
+
"windows-link 0.2.0",
]
[[package]]
···
dependencies = [
"equivalent",
"hashbrown",
+
"serde",
]
[[package]]
name = "insta"
-
version = "1.43.1"
+
version = "1.43.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-
checksum = "154934ea70c58054b556dd430b99a98c2a7ff5309ac9891597e339b5c28f4371"
+
checksum = "46fdb647ebde000f43b5b53f773c30cf9b0cb4300453208713fa38b2c70935a0"
dependencies = [
"console",
"once_cell",
···
[[package]]
name = "nbtree_core"
-
version = "0.1.0"
+
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-
checksum = "8b997801ac5ce31a845d736bfe838113079c3e56cff1ed498813e793c6c6959c"
+
checksum = "d3734790c3fc67f9f086c8f1c694f8ce6c5f4fdc49f5a04a1e7f9b9a90e06ab6"
dependencies = [
"byteorder",
"cesu8",
"indexmap",
"miette",
"num-traits",
+
"serde",
"thiserror 2.0.15",
"unicode_names2",
]
···
[[package]]
name = "serde"
-
version = "1.0.219"
+
version = "1.0.228"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e"
+
dependencies = [
+
"serde_core",
+
"serde_derive",
+
]
+
+
[[package]]
+
name = "serde_core"
+
version = "1.0.228"
source = "registry+https://github.com/rust-lang/crates.io-index"
-
checksum = "5f0e2c6ed6606019b4e29e69dbaba95b11854410e5347d525002456dbbb786b6"
+
checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad"
dependencies = [
"serde_derive",
]
[[package]]
name = "serde_derive"
-
version = "1.0.219"
+
version = "1.0.228"
source = "registry+https://github.com/rust-lang/crates.io-index"
-
checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00"
+
checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79"
dependencies = [
"proc-macro2",
"quote",
···
dependencies = [
"windows-implement",
"windows-interface",
-
"windows-link",
+
"windows-link 0.1.3",
"windows-result",
"windows-strings",
]
···
checksum = "5e6ad25900d524eaabdbbb96d20b4311e1e7ae1699af4fb28c17ae66c80d798a"
[[package]]
+
name = "windows-link"
+
version = "0.2.0"
+
source = "registry+https://github.com/rust-lang/crates.io-index"
+
checksum = "45e46c0661abb7180e7b9c281db115305d49ca1709ab8242adf09666d2173c65"
+
+
[[package]]
name = "windows-result"
version = "0.3.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "56f42bd332cc6c8eac5af113fc0c1fd6a8fd2aa08a0119358686e5160d0586c6"
dependencies = [
-
"windows-link",
+
"windows-link 0.1.3",
]
[[package]]
···
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "56e6c93f3a0c3b36176cb1327a4958a0353d5d166c2a35cb268ace15e91d3b57"
dependencies = [
-
"windows-link",
+
"windows-link 0.1.3",
]
[[package]]
+5 -5
Cargo.toml
···
resolver = "3"
[workspace.package]
-
repository = "https://tangled.sh/@kokirigla.de/hateno"
+
repository = "https://tangled.org/@did:plc:uthy5qqccx3hdwxo7sriplmh/hateno"
[dependencies]
chrono.workspace = true
···
uuid.workspace = true
[workspace.dependencies]
-
chrono = ">=0.4.20"
+
chrono = "^0.4.20"
flate2 = "1.1"
insta = "1.43"
lz4 = "1.28"
-
nbtree_core = "0.1"
-
serde = "1"
-
thiserror = "2"
+
nbtree_core = "0.2"
+
serde = "1.0"
+
thiserror = "2.0"
uuid = "1.18"
[dev-dependencies]
Justfile justfile
+1 -1
README.md
···
[hateno_convert]: https://crates.io/crates/hateno_convert
[hateno_serde]: https://crates.io/crates/hateno_serde
[serde]: https://serde.rs
-
[spec]: https://tangled.sh/@kokirigla.de/hateno/blob/trunk/docs/SPECIFICATION.md
+
[spec]: https://tangled.org/@did:plc:uthy5qqccx3hdwxo7sriplmh/hateno/blob/trunk/docs/SPECIFICATION.md
+5 -2
docs/SPECIFICATION.md
···
- Unsigned integers: Standard binary representation
- Signed integers: Two's complement representation
- Floating-point: IEEE 754 standard (binary32 for f32, binary64 for f64)
-
- Endianness: Determined by file header flags (see Section 4.2.4)
+
- Endianness: Determined by file header flags (see Section 5.2.3)
<!-- TOC --><a name="22-string-encoding"></a>
···
```
[type_id: u8] [inner_type_id: u8] [discriminant: u8] [payload?]
```
+
+
Note that the inner type ID is preserved so that type information is
+
available even in case of a `None` value.
- `inner_type_id`: Type ID of the contained value
- `discriminant`:
···
```
[0x48, 0x54, 0x4e, 0x4f] // Magic: "HTNO"
-
[0x01] // Version: 2.1
+
[0x01] // Version: 1.0
[0x00] // Flags: little-endian
[0x00] // Compression: none
[23, 0, 0, 0] // Payload length: 23 bytes