{
"$type": "site.standard.document",
"bskyPostRef": {
"cid": "bafyreictpigjk7elxerv6gu36rnviemzuegunmfhdyedaknnncatgau26i",
"uri": "at://did:plc:ivbknywyskln22er3nkssdhl/app.bsky.feed.post/3mng2jh3zeaz2"
},
"path": "/t/possibility-of-a-global-time-source-for-wasm-targets/24370#post_3",
"publishedAt": "2026-06-03T20:06:44.000Z",
"site": "https://internals.rust-lang.org",
"textContent": "What we need is not another special case -- libs-api has talked about not wanting to own more of these -- but some generalized language feature for pluggable implementations for things that allocators could _also_ migrate to.\n\nImagine some kind of `#[magic_pluggable_thing] pub static ALLOCATOR: impl GlobalAlloc;` that different crates could provide, say.\n\nWe'd then use that for all kinds of things -- float parsing, for example, which is giant in code size so people might want to just always-panic or use a shared implementation between their rust and C code rather than the one in `core`.\n\n~~(That'll take a bunch of design work, though, across lots of stuff.)~~ Oh, see below.",
"title": "Possibility of a \"global time source\" for wasm targets"
}