[GH-ISSUE #16] Hooks on methods of generic impls #6

Open
opened 2026-11-02 15:32:20 +07:00 by bsakaguchi · 0 comments
Owner

Originally created by @reservedbytes on GitHub (Oct 31, 2026).
Original GitHub issue: https://github.com/horizon-rust/horizon-mixins/issues/16

Any injection into a method of a generic impl is rejected at plan time with E_UNSUPPORTED_SIGNATURE ("MVP requires a synchronous, safe, non-const, non-generic Rust function"), and the README lists generic targets as unsupported

In Horizon that rules out the block shape and connection logic, which lives in horizon_world::level::shapes::Sim<'_, L>: fence_connects_to (FenceBlock.connectsTo), wall_connects_to, bars_attach_to, fire_state_for, coral_plant_scan_for_water, concrete_touches_liquid and the rest of that impl
So a mod can't make fences, walls or panes connect to its blocks, or change those rules

What would help

  • injecting into a method of a generic impl, with the hook body either monomorphic (the impl's parameters fixed at that call) or generic over the same parameters

Seen on horizon-mixins 3f99a5c, and the README on main (a2af5c0) still lists generic targets as unsupported

Originally created by @reservedbytes on GitHub (Oct 31, 2026). Original GitHub issue: https://github.com/horizon-rust/horizon-mixins/issues/16 Any injection into a method of a generic impl is rejected at plan time with `E_UNSUPPORTED_SIGNATURE` ("MVP requires a synchronous, safe, non-const, non-generic Rust function"), and the README lists generic targets as unsupported In Horizon that rules out the block shape and connection logic, which lives in `horizon_world::level::shapes::Sim<'_, L>`: `fence_connects_to` (`FenceBlock.connectsTo`), `wall_connects_to`, `bars_attach_to`, `fire_state_for`, `coral_plant_scan_for_water`, `concrete_touches_liquid` and the rest of that impl So a mod can't make fences, walls or panes connect to its blocks, or change those rules What would help - injecting into a method of a generic impl, with the hook body either monomorphic (the impl's parameters fixed at that call) or generic over the same parameters Seen on horizon-mixins 3f99a5c, and the README on main (a2af5c0) still lists generic targets as unsupported
Sign in to join this conversation.
No labels
pull-request
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
horizon-rust/horizon-mixins#6
No description provided.