Skip to content

feat!: Allow validation of wasm for h2 platform#1532

Merged
trvto merged 3 commits intomainfrom
travis/feat/h2-wasm-validation
Feb 25, 2026
Merged

feat!: Allow validation of wasm for h2 platform#1532
trvto merged 3 commits intomainfrom
travis/feat/h2-wasm-validation

Conversation

@trvto
Copy link
Copy Markdown
Contributor

@trvto trvto commented Feb 24, 2026

  • Adds paramter to @wasm_module used to toggle which platform wasm should be validated for
  • Signature validation errors mention which platform is used

BREAKING CHANGE: Added wasm platform parameter to decode_wasm_functions, decode_sig and decode_type functions in guppylang_internals/wasm_util.py

BREAKING CHANGE: Added wasm platform information to WasmSignatureError

BREAKING CHANGE: Added wasm platform parameter to WasmModuleTypeDef.__init__

Not a guppylang breaking change

@trvto trvto requested a review from a team as a code owner February 24, 2026 18:02
@trvto trvto requested a review from mark-koch February 24, 2026 18:02
@hugrbot
Copy link
Copy Markdown
Collaborator

hugrbot commented Feb 24, 2026

This PR contains breaking changes to the public Python API.

Breaking changes summary
guppylang-internals/src/guppylang_internals/wasm_util.py:34: WasmSignatureError.title:
Attribute value was changed:
Old: 'Invalid signature for @wasm function `{fn_name}`\nin wasm file:\n`{filename}`'
New: 'Invalid signature for @wasm function `{fn_name}`\non wasm platform `{platform}`\nin wasm file:\n`{filename}`'

guppylang-internals/src/guppylang_internals/wasm_util.py:0: WasmSignatureError.__init__(platform):
Parameter was added as required

guppylang-internals/src/guppylang_internals/wasm_util.py:101: decode_type(ty):
Positional parameter was moved
Details: position: from 0 to 1 (+1)

guppylang-internals/src/guppylang_internals/wasm_util.py:101: decode_type(wasm_platform):
Parameter was added as required

guppylang-internals/src/guppylang_internals/wasm_util.py:109: decode_sig(params):
Positional parameter was moved
Details: position: from 0 to 1 (+1)

guppylang-internals/src/guppylang_internals/wasm_util.py:109: decode_sig(output):
Positional parameter was moved
Details: position: from 1 to 2 (+1)

guppylang-internals/src/guppylang_internals/wasm_util.py:109: decode_sig(wasm_platform):
Parameter was added as required

guppylang-internals/src/guppylang_internals/wasm_util.py:128: decode_wasm_functions(wasm_platform):
Parameter was added as required

guppylang-internals/src/guppylang_internals/tys/builtin.py:133: WasmModuleTypeDef.__init__(wasm_platform):
Parameter was added as required


@trvto trvto changed the title Allow validation of wasm for h2 platform feat: Allow validation of wasm for h2 platform Feb 24, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Feb 24, 2026

🐰 Bencher Report

Branchtravis/feat/h2-wasm-validation
TestbedLinux
Click to view all benchmark results
BenchmarkLatencyBenchmark Result
microseconds (µs)
(Result Δ%)
Upper Boundary
microseconds (µs)
(Limit %)
tests/benchmarks/test_big_array.py::test_big_array_check📈 view plot
🚷 view threshold
696,458.98 µs
(-9.42%)Baseline: 768,859.72 µs
807,302.71 µs
(86.27%)
tests/benchmarks/test_big_array.py::test_big_array_compile📈 view plot
🚷 view threshold
1,970,776.11 µs
(+2.75%)Baseline: 1,918,065.33 µs
2,013,968.59 µs
(97.86%)
tests/benchmarks/test_big_array.py::test_big_array_executable📈 view plot
🚷 view threshold
8,019,737.25 µs
(+1.95%)Baseline: 7,866,619.10 µs
8,259,950.06 µs
(97.09%)
tests/benchmarks/test_ctrl_flow.py::test_many_ctrl_flow_check📈 view plot
🚷 view threshold
55,927.52 µs
(+0.73%)Baseline: 55,524.94 µs
58,301.18 µs
(95.93%)
tests/benchmarks/test_ctrl_flow.py::test_many_ctrl_flow_compile📈 view plot
🚷 view threshold
116,686.72 µs
(+0.74%)Baseline: 115,834.67 µs
121,626.40 µs
(95.94%)
tests/benchmarks/test_ctrl_flow.py::test_many_ctrl_flow_executable📈 view plot
🚷 view threshold
629,074.57 µs
(-16.74%)Baseline: 755,549.38 µs
793,326.84 µs
(79.30%)
tests/benchmarks/test_prelude.py::test_import_guppy📈 view plot
🚷 view threshold
48.41 µs
(-2.06%)Baseline: 49.43 µs
51.90 µs
(93.27%)
🐰 View full continuous benchmarking report in Bencher

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Feb 24, 2026

🐰 Bencher Report

Branchtravis/feat/h2-wasm-validation
TestbedLinux
Click to view all benchmark results
Benchmarkhugr_bytesBenchmark Result
bytes x 1e3
(Result Δ%)
Upper Boundary
bytes x 1e3
(Limit %)
hugr_nodesBenchmark Result
nodes
(Result Δ%)
Upper Boundary
nodes
(Limit %)
tests/benchmarks/test_big_array.py::test_big_array_compile📈 view plot
🚷 view threshold
140.94 x 1e3
(0.00%)Baseline: 140.94 x 1e3
142.35 x 1e3
(99.01%)
📈 view plot
🚷 view threshold
6,592.00
(0.00%)Baseline: 6,592.00
6,657.92
(99.01%)
tests/benchmarks/test_ctrl_flow.py::test_many_ctrl_flow_compile📈 view plot
🚷 view threshold
18.59 x 1e3
(0.00%)Baseline: 18.59 x 1e3
18.78 x 1e3
(99.01%)
📈 view plot
🚷 view threshold
608.00
(0.00%)Baseline: 608.00
614.08
(99.01%)
🐰 View full continuous benchmarking report in Bencher

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Feb 24, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.44%. Comparing base (2d38587) to head (5808fdf).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1532   +/-   ##
=======================================
  Coverage   93.43%   93.44%           
=======================================
  Files         128      128           
  Lines       11927    11943   +16     
=======================================
+ Hits        11144    11160   +16     
  Misses        783      783           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@trvto trvto changed the title feat: Allow validation of wasm for h2 platform feat!: Allow validation of wasm for h2 platform Feb 24, 2026
@trvto trvto requested a review from croyzor February 24, 2026 18:28


def decode_type(ty: wt.ValType) -> Type | None:
def decode_type_default(ty: wt.ValType) -> Type | None:
Copy link
Copy Markdown
Collaborator

@croyzor croyzor Feb 25, 2026

Choose a reason for hiding this comment

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

This could be decode_type_helios now, it's restricted in its own way...

Copy link
Copy Markdown
Collaborator

@croyzor croyzor left a comment

Choose a reason for hiding this comment

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

Nice! 🚀

@trvto trvto enabled auto-merge February 25, 2026 12:15
@trvto trvto added this pull request to the merge queue Feb 25, 2026
Merged via the queue into main with commit d4db24f Feb 25, 2026
9 checks passed
@trvto trvto deleted the travis/feat/h2-wasm-validation branch February 25, 2026 12:20
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.

4 participants