Skip to content

Runtime Instance Data #514

@krakow10

Description

@krakow10

RBXScriptSignal is not serialized or represented in the Roblox file formats, but is associated to specific instances at run time. Implementing this without the RBXScriptSignal being directly owned by the Instance means creating a garbage collector.

I can think of three different implementations of this, and have written two:

  1. Generics (Generic WeakDom using AsRef<Instance> #488)
    • awful but extensible
  2. Feature gated field (Add Userdata Field To rbx_dom_weak::Instance Behind Feature Flag #513)
    • surgical but not useful for others
    • could be changed to Option<Box<dyn std::any::Any>> to drop mlua (implemented here)
  3. Implement a generic field for Instance rather than Instance itself being a generic
    • this would probably be a smaller mess than 1 and less awful

I am looking for feedback on whether this can make sense upstream or whether I should continue to maintain a fork of various rbx-dom crates. Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions