Skip to content

Allow helper functions at Hooks [DO NOT MERGE]#667

Open
tequdev wants to merge 6 commits intodevfrom
hook-helper-func
Open

Allow helper functions at Hooks [DO NOT MERGE]#667
tequdev wants to merge 6 commits intodevfrom
hook-helper-func

Conversation

@tequdev
Copy link
Member

@tequdev tequdev commented Jan 19, 2026

High Level Overview of Change

Currently, Hooks WASM only allows two functions: hook() and cbak().
Because of this, all code must be written directly inside these functions or be inlined.
However, depending on the compiler, while simple code can be inlined, more complex logic often cannot be.

This PR enables calling helper functions from hook() and cbak(), which will improve the developer experience in terms of code reusability and readability.

HookCleaner

Context of Change

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Refactor (non-breaking change that only restructures code)
  • Tests (you added tests for code that already exists, or your new feature included in this PR)
  • Documentation update
  • Chore (no impact to binary, e.g. .gitignore, formatting, dropping support for older tooling)
  • Release

API Impact

  • Public API: New feature (new methods and/or new fields)
  • Public API: Breaking change (in general, breaking changes should only impact the next api_version)
  • libxrpl change (any change that may affect libxrpl or dependents of libxrpl)
  • Peer protocol change (must be backward compatible or bump the peer protocol version)

TODO

  • Amendment guard
  • Check Fee

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