Rhai improvements #19

Open
opened 2026-01-08 02:03:44 +00:00 by scott · 0 comments
Member

There is some room for improvement in the Rhai engine:

  • Boilerplate code to call async (since Rhai can't do this natively)
    • Done via async wrappers, need to test more
  • Use of generic call_function where there should be an SDK function implemented (see groups, eg)
  • Logic is implemented within the Rhai wrapper that should probably be pushed up to the SDK (see send_near_internal, eg)
    • We should also check if the CLI is also doing its own logic to implement higher level operations and consolidate into the SDK
  • Use of "internal" functions when the "external" function does nothing but call it

Generally speaking, I think we should shoot for turning our Rhai functions into one liner wrappers around SDK functions, as far as that's possible.

WIP: https://forge.ourworld.tf/geomind_research/hero_ledger/src/branch/rhai_refactor

There is some room for improvement in the Rhai engine: - [x] Boilerplate code to call async (since Rhai can't do this natively) - Done via async wrappers, need to test more - [ ] Use of generic `call_function` where there should be an SDK function implemented (see groups, eg) - [ ] Logic is implemented within the Rhai wrapper that should probably be pushed up to the SDK (see `send_near_internal`, eg) - We should also check if the CLI is also doing its own logic to implement higher level operations and consolidate into the SDK - [ ] Use of "internal" functions when the "external" function does nothing but call it Generally speaking, I think we should shoot for turning our Rhai functions into one liner wrappers around SDK functions, as far as that's possible. WIP: https://forge.ourworld.tf/geomind_research/hero_ledger/src/branch/rhai_refactor
scott self-assigned this 2026-01-08 20:55:46 +00:00
Sign in to join this conversation.
No labels
urgent
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
geomind_research/hero_ledger#19
No description provided.