Skip to content

Bump abstract-bits to support signed integers - #58

Open
puddly wants to merge 3 commits into
devfrom
puddly/abstract-bits-bump
Open

Bump abstract-bits to support signed integers#58
puddly wants to merge 3 commits into
devfrom
puddly/abstract-bits-bump

Conversation

@puddly

@puddly puddly commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

Implemented in yara-blue/abstract-bits#10, which adds support for signed integers and lets us remove a few hacks.

@puddly
puddly marked this pull request as ready for review August 20, 2026 19:54
Copilot AI lite review requested due to automatic review settings August 20, 2026 19:54

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the workspace to a newer abstract-bits revision that supports signed integer fields, allowing the Zigbee/protocol wire types to use i8 directly and removing local serialization workarounds.

Changes:

  • Switch abstract-bits dependency to a pinned git revision and update lockfiles accordingly.
  • Replace several “two’s complement in u8” fields with real i8 fields in protocol payloads and remove the corresponding casts in bridge/server/NCP code.
  • Remove the custom RenamedU24 workaround and use u24 directly for Zigbee beacon tx_offset.

Reviewed changes

Copilot reviewed 11 out of 13 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
crates/ziggurat-zigbee/src/beacon.rs Drops the RenamedU24 workaround and uses u24 directly in the beacon payload (and test).
crates/ziggurat-zigbee/Cargo.toml Points abstract-bits at the new pinned git revision.
crates/ziggurat-server/src/main.rs Removes as u8 casts and sends i8 RSSI values directly in events.
crates/ziggurat-protocol/src/wire.rs Changes wire payload fields from u8 to i8 for signed values (RSSI/priority/tx_power).
crates/ziggurat-protocol/src/bridge.rs Removes now-unnecessary casts when mapping between wire payloads and driver/stack types.
crates/ziggurat-protocol/Cargo.toml Points abstract-bits at the new pinned git revision.
crates/ziggurat-ncp-api/src/protocol.rs Removes as u8 casts and forwards i8 RSSI values directly in events.
crates/ziggurat-ncp-api/Cargo.toml Points abstract-bits at the new pinned git revision.
crates/ziggurat-ncp-api/Cargo.lock Lockfile updates due to the new abstract-bits revision and its proc-macro dependency changes.
crates/ziggurat-ieee-802154/Cargo.toml Points abstract-bits at the new pinned git revision.
crates/ziggurat-driver/src/zigbee_stack/mac.rs Updates beacon construction to use u24 directly for tx_offset.
crates/ziggurat-driver/Cargo.toml Points abstract-bits at the new pinned git revision.
Cargo.lock Workspace lockfile updates due to the new abstract-bits revision and its proc-macro dependency changes.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines 12 to 16
# Types only (ZigbeeNotification, NetworkConfig, ZigbeeStack, …); the runtime seam is
# left to whichever workspace consumes this crate (tokio on the host, embassy on the MCU).
ziggurat-driver = { path = "../ziggurat-driver", default-features = false }
abstract-bits = { git = "https://github.com/yara-blue/abstract-bits.git", version = "0.2.0" }
abstract-bits = { git = "https://github.com/puddly/abstract-bits.git", rev = "1f67dd91dce8a4c3b2c760ac317780856c1d6805", version = "0.2.0" }
arbitrary-int = "2.1.1"
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.

2 participants