Skip to content

Bump chasm from 2.1.0 to 2.2.0 - #53

Merged
IRus merged 1 commit into
mainfrom
dependabot/gradle/chasm-2.2.0
Oct 19, 2026
Merged

IRus merged 1 commit into
mainfrom
dependabot/gradle/chasm-2.2.0

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Oct 19, 2026

Copy link
Copy Markdown
Contributor

Bumps chasm from 2.1.0 to 2.2.0.
Updates io.github.charlietap.chasm:chasm-jvm from 2.1.0 to 2.2.0

Release notes

Sourced from io.github.charlietap.chasm:chasm-jvm's releases.

2.2.0

Whats Changed

Faster decoding and validation

This release optimises how Chasm decodes and validates modules, the optimisations came from three places:

  • I found a number of bottlenecks by profiling decoding and validation of some of the larger corpus fixtures, interestingly most of the fixes are micro optimisations and better compiler emits rather than me finding some silly quadratic code. Certain paths are just that hot that small tweaks have large ramifications.
  • Suspending variants of decode and validate now use a work stealing algorithm algorithm to share the work across the available cores, the original implementation was too clever for its own good trying to weight workloads and share them based on heuristics I'd developed. Note to self work stealing queues can not be defeated
  • Suspending variants of decode and validate now use a zero copy algorithm I developed for another runtime, this is largely just a port to Kotlin

The numbers below were measured on Android, on a Pixel 8 Pro with a release build. Results will vary from platform to platform and from module to module, so treat them as a guide rather than a promise.

Compared with 2.1.0:

Expect
Decoding (module) about 3x faster
Validation (validate) about 10% faster
Suspending decoding (chasm-coroutines module) about 4.5x faster
Suspending validation (chasm-coroutines validate) about 3x faster
Suspending decode then validate about 4x faster
Suspending decode and validate in a single pass (new) about 4.2x faster

Decode and validate in a single pass

If you're using chasm-coroutines and validating your modules, we recommend the new overload of module, which decodes and validates in a single pass:

val module = module(bytes, validate = true)

It's faster than decoding and then validating, roughly another 5-15% on top of the gains above, and the module it returns doesn't need validating again. Errors come back as a ChasmError.ModuleError, which is either a DecodeError or a ValidationError.

The suspending validate is now deprecated in favour of this. The blocking module and validate functions are unchanged.

Wasm traps with stack traces

Instances can now report where Wasm code failed. Enable it with debugInfo when instantiating:

val instance = instance(store, module, imports, RuntimeConfig(debugInfo = true))

When a call traps, the ExecutionError carries a trap describing the failure:

  • the frames that led to it, with function names where the module provides them and offsets into the Wasm binary;
  • for out of bounds memory accesses, the address, width and memory size;
  • for very deep traces, both ends of the stack, with a count of the frames left out.

... (truncated)

Commits
  • 02033f2 build: prepare for release 2.2.0
  • 8d2d111 module: introduce new module abstraction that capable of performing decoding ...
  • efd82ea validator: order instruction dispatch by frequency
  • d7360c2 decoder: reuse the instruction buffer across expressions
  • 15db603 decoder/reader: peek buffered bytes without a refill request
  • abb0b10 decoder: decode indices and variable instructions without binding
  • bb09ce0 decoder: resolve numeric operators with a table lookup
  • 9d6fd57 decoder: remove indirection when dispatching instruction decoders
  • cd3d2af ci: optimise publication workflow
  • e81cc14 embedding: report wasm traps with stack traces
  • Additional commits viewable in compare view

Updates io.github.charlietap.chasm:chasm from 2.1.0 to 2.2.0

Release notes

Sourced from io.github.charlietap.chasm:chasm's releases.

2.2.0

Whats Changed

Faster decoding and validation

This release optimises how Chasm decodes and validates modules, the optimisations came from three places:

  • I found a number of bottlenecks by profiling decoding and validation of some of the larger corpus fixtures, interestingly most of the fixes are micro optimisations and better compiler emits rather than me finding some silly quadratic code. Certain paths are just that hot that small tweaks have large ramifications.
  • Suspending variants of decode and validate now use a work stealing algorithm algorithm to share the work across the available cores, the original implementation was too clever for its own good trying to weight workloads and share them based on heuristics I'd developed. Note to self work stealing queues can not be defeated
  • Suspending variants of decode and validate now use a zero copy algorithm I developed for another runtime, this is largely just a port to Kotlin

The numbers below were measured on Android, on a Pixel 8 Pro with a release build. Results will vary from platform to platform and from module to module, so treat them as a guide rather than a promise.

Compared with 2.1.0:

Expect
Decoding (module) about 3x faster
Validation (validate) about 10% faster
Suspending decoding (chasm-coroutines module) about 4.5x faster
Suspending validation (chasm-coroutines validate) about 3x faster
Suspending decode then validate about 4x faster
Suspending decode and validate in a single pass (new) about 4.2x faster

Decode and validate in a single pass

If you're using chasm-coroutines and validating your modules, we recommend the new overload of module, which decodes and validates in a single pass:

val module = module(bytes, validate = true)

It's faster than decoding and then validating, roughly another 5-15% on top of the gains above, and the module it returns doesn't need validating again. Errors come back as a ChasmError.ModuleError, which is either a DecodeError or a ValidationError.

The suspending validate is now deprecated in favour of this. The blocking module and validate functions are unchanged.

Wasm traps with stack traces

Instances can now report where Wasm code failed. Enable it with debugInfo when instantiating:

val instance = instance(store, module, imports, RuntimeConfig(debugInfo = true))

When a call traps, the ExecutionError carries a trap describing the failure:

  • the frames that led to it, with function names where the module provides them and offsets into the Wasm binary;
  • for out of bounds memory accesses, the address, width and memory size;
  • for very deep traces, both ends of the stack, with a count of the frames left out.

... (truncated)

Commits
  • 02033f2 build: prepare for release 2.2.0
  • 8d2d111 module: introduce new module abstraction that capable of performing decoding ...
  • efd82ea validator: order instruction dispatch by frequency
  • d7360c2 decoder: reuse the instruction buffer across expressions
  • 15db603 decoder/reader: peek buffered bytes without a refill request
  • abb0b10 decoder: decode indices and variable instructions without binding
  • bb09ce0 decoder: resolve numeric operators with a table lookup
  • 9d6fd57 decoder: remove indirection when dispatching instruction decoders
  • cd3d2af ci: optimise publication workflow
  • e81cc14 embedding: report wasm traps with stack traces
  • Additional commits viewable in compare view

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps `chasm` from 2.1.0 to 2.2.0.

Updates `io.github.charlietap.chasm:chasm-jvm` from 2.1.0 to 2.2.0
- [Release notes](https://github.com/CharlieTap/chasm/releases)
- [Commits](CharlieTap/chasm@2.1.0...2.2.0)

Updates `io.github.charlietap.chasm:chasm` from 2.1.0 to 2.2.0
- [Release notes](https://github.com/CharlieTap/chasm/releases)
- [Commits](CharlieTap/chasm@2.1.0...2.2.0)

---
updated-dependencies:
- dependency-name: io.github.charlietap.chasm:chasm-jvm
  dependency-version: 2.2.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.github.charlietap.chasm:chasm
  dependency-version: 2.2.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
@IRus
IRus merged commit bf7de79 into main Oct 19, 2026
9 of 10 checks passed
@dependabot
dependabot Bot deleted the dependabot/gradle/chasm-2.2.0 branch October 19, 2026 07:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

1 participant