# Global Registration (a kind of pre-rfc)

**URL:** <https://internals.rust-lang.org/t/global-registration-a-kind-of-pre-rfc/20813>\
**Category:** language design\
**Created:** [May 13, 2024, 8:29am UTC](https://internals.rust-lang.org/t/global-registration-a-kind-of-pre-rfc/20813 "2024-05-13T08:29:21Z")\
**Posts on this page:** 1\
**Showing post:** 26

<div class="post-metadata">

**Author:** ![jdonszelmann](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/jdonszelmann/32/12155_2.png) [@jdonszelmann](https://internals.rust-lang.org/u/jdonszelmann)\
**Post date:** [May 14, 2024, 8:17am UTC](https://internals.rust-lang.org/t/global-registration-a-kind-of-pre-rfc/20813/26 "2024-05-14T08:17:21Z")

</div>

Hi! I agree with you, the syntax I gave is not quite right. I've been very careful not to use any syntax sofar actually, to limit the bikeshedding. That was something I copied from another user to demonstrate. However, I agree that your alternatives make more sense.

MSG is a reference to a str, so I'd say the reference becomes an actual item in the slice here and the str itself is local here. But I don't think that matters a lot in the end, as long as you can iterate over them all. In the end, the static gets _some_ address, and we can use that address and that address also exists in the distributed slice. If you really want to, `global_register` _could_ return an address, so it's really only stored in the slice. But imo an address is still better than an index (since indices are hard when considering any linked-like model).

Finally, those are my thoughts as well, that the most flexible and functional is a static slice, possibly linked to other static slices of other dylibs when necessary

---

_[View the full topic](https://internals.rust-lang.org/t/global-registration-a-kind-of-pre-rfc/20813)._
