Skip to content

chore: release 0.2.0 - #3

Merged
BinFlip merged 1 commit into
mainfrom
feature/v0.2.0
Sep 27, 2026
Merged

BinFlip merged 1 commit into
mainfrom
feature/v0.2.0

Conversation

@BinFlip

@BinFlip BinFlip commented Sep 27, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Adds signature: parses internal procedure export declarations (InternalProc::signature()), external bit strings, and DLL import declarations (ExternalProc::declaration()). Signature::slot classifies stack slots.
  • Adds frame: StackMap (ProcDisasm::stack_map()) gives the stack height before every instruction and rejects bodies whose paths disagree (Error::StackImbalance). StackMap::call_slots gives the slots a call consumes.
  • Adds Opcode::operands() and Operand::var_refs().
  • Fixes cm_spc (SetStackPointerToCopy) decoding: it carries two variables, not a u32, so procedures containing it previously failed to decode.
  • Fixes flaggoto and PushExceptionHandler section coordinates: they are deltas from the end of the instruction, not procedure-local absolutes. An absent handler section is now None.
  • FlagGoto is now a conditional branch in Opcode::flow_type().
  • Unknown opcode / sub-operation bytes report Error::UnknownOpcode / Error::UnknownSubOp instead of Error::UnknownBaseType.

Breaking changes

ProcDisasm::branch_target() / branch_targets() are removed, FlagGoto's field is renamed to offset, and SetStackPointerToCopy is now { dest, src }. That is why this is 0.2.0 rather than 0.1.4.

Verification

  • cargo fmt --check
  • cargo clippy --all-targets -- -D warnings
  • cargo test on stable and on MSRV 1.85 (50 passed)
  • RUSTDOCFLAGS="-D warnings" cargo doc --no-deps
  • cargo publish --dry-run

Add `signature` (procedure export declarations and DLL import
declarations) and `frame` (per-instruction stack heights and the slots
each call consumes), plus `Opcode::operands()` and
`Operand::var_refs()`.

Fix the decoding of `cm_spc`, which carries two variables rather than a
u32, and the coordinates of `flaggoto` and the `try` handler sections,
which are deltas from the end of the instruction rather than
procedure-local absolutes. Unknown opcode and sub-operation bytes now
report their own errors.

These change the public API (`ProcDisasm::branch_target()` /
`branch_targets()` are removed, `FlagGoto`'s field is renamed and
`SetStackPointerToCopy` gains a second operand), so this is a minor
bump rather than 0.1.4.
@BinFlip
BinFlip merged commit 6e36047 into main Sep 27, 2026
5 checks passed
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