Skip to content

fix(decoder): GC ref type decoding and custom page sizes support#158

Merged
avrabe merged 1 commit intomainfrom
fix/gc-decoder-custom-page-sizes
Mar 15, 2026
Merged

fix(decoder): GC ref type decoding and custom page sizes support#158
avrabe merged 1 commit intomainfrom
fix/gc-decoder-custom-page-sizes

Conversation

@avrabe
Copy link
Collaborator

@avrabe avrabe commented Mar 15, 2026

Summary

  • Parse multi-byte GC reference types (0x63/0x64 + heap type) in local variable declarations and global import types — previously only single-byte value types were handled, causing GC modules to fail decoding
  • Accept custom-page-sizes proposal flag (bit 3) in memory limits, validate page size is power of 2 and <= 65536
  • Add page_size: Option<u32> field to MemoryType across all construction sites

Test plan

  • custom-page-sizes.wast: 0/45 → 33/45 passing
  • struct.wast: modules now decode successfully (6 modules load)
  • ref_eq.wast: modules decode past decoder stage
  • cargo check passes

Trace: skip

🤖 Generated with Claude Code

Decoder:
- Parse multi-byte GC reference types (0x63/0x64 + heap type) in local
  variable declarations and global import types. Previously only
  single-byte value types were handled, causing GC modules to fail
  decoding.
- Accept custom-page-sizes flag (bit 3) in memory limits. Read and
  validate the custom page size (must be power of 2, <= 65536).

Add page_size field to MemoryType across all construction sites.

Trace: skip

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@avrabe avrabe merged commit ad1eaab into main Mar 15, 2026
14 checks passed
@avrabe avrabe deleted the fix/gc-decoder-custom-page-sizes branch March 15, 2026 19:07
@github-actions
Copy link

🔍 Build Diagnostics Report

Summary

Metric Base Branch This PR Change
Errors 0 0 0
Warnings 2 2 0

🎯 Impact Analysis

Issues in Files You Modified

  • 0 new errors introduced by your changes
  • 0 new warnings introduced by your changes
  • 0 total errors in modified files
  • 0 total warnings in modified files
  • 0 files you modified

Cascading Issues (Your Changes Breaking Other Files)

  • 0 new errors in unchanged files
  • 0 new warnings in unchanged files
  • 0 unchanged files now affected

Note: "Cascading issues" are errors in files you didn't modify, caused by your changes (e.g., breaking API changes, dependency issues).

✅ No Issues Detected

Perfect! Your changes don't introduce any new errors or warnings, and don't break any existing code.


📊 Full diagnostic data available in workflow artifacts

🔧 To reproduce locally:

# Install cargo-kiln
cargo install --path cargo-kiln

# Analyze your changes
cargo-kiln build --output json --filter-severity error
cargo-kiln check --output json --filter-severity warning

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