Skip to content

Comments

Fix: Honor intEncoding: 'variant' for float f16 type#9

Open
incapdns wants to merge 30 commits into4t145:masterfrom
incapdns:master
Open

Fix: Honor intEncoding: 'variant' for float f16 type#9
incapdns wants to merge 30 commits into4t145:masterfrom
incapdns:master

Conversation

@incapdns
Copy link

@incapdns incapdns commented Nov 8, 2025

Here's what's happening:

f16 is treated as u16: The serde_bincode library (in the Rust backend) doesn't natively support half::f16. When you use SerdeAtomicF16, serde simply takes the raw bits of f16 and treats them as a u16.

varint is applied to u16: Because the Bincode (Rust) configuration is using variable integer encoding, it sees this u16 and applies varint logic to it.

This is why structures (that use f16) will fail: the f16 was sent as 3 bytes ([251, byte1, byte2]), but bincode-ts expected 2 bytes, which in this case was currently commented out.

@incapdns incapdns changed the title Fix: Honor intEncoding: 'variant' for float types (f16, f32, f64) Fix: Honor intEncoding: 'variant' for float f16 type Nov 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant