{"action":"created","issue":{"url":"https://api.github.com/repos/rust-lang/rust/issues/33082","repository_url":"https://api.github.com/repos/rust-lang/rust","labels_url":"https://api.github.com/repos/rust-lang/rust/issues/33082/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/rust/issues/33082/comments","events_url":"https://api.github.com/repos/rust-lang/rust/issues/33082/events","html_url":"https://github.com/rust-lang/rust/issues/33082","id":149262561,"number":33082,"title":"Tracking issue for alloc_system/alloc_jemalloc","user":{"login":"alexcrichton","id":64996,"avatar_url":"https://avatars.githubusercontent.com/u/64996?v=3","gravatar_id":"","url":"https://api.github.com/users/alexcrichton","html_url":"https://github.com/alexcrichton","followers_url":"https://api.github.com/users/alexcrichton/followers","following_url":"https://api.github.com/users/alexcrichton/following{/other_user}","gists_url":"https://api.github.com/users/alexcrichton/gists{/gist_id}","starred_url":"https://api.github.com/users/alexcrichton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexcrichton/subscriptions","organizations_url":"https://api.github.com/users/alexcrichton/orgs","repos_url":"https://api.github.com/users/alexcrichton/repos","events_url":"https://api.github.com/users/alexcrichton/events{/privacy}","received_events_url":"https://api.github.com/users/alexcrichton/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/rust-lang/rust/labels/B-unstable","name":"B-unstable","color":"e102d8"},{"url":"https://api.github.com/repos/rust-lang/rust/labels/I-nominated","name":"I-nominated","color":"e10c02"},{"url":"https://api.github.com/repos/rust-lang/rust/labels/T-libs","name":"T-libs","color":"bfd4f2"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2016-04-18T20:27:24Z","updated_at":"2016-04-19T19:51:39Z","closed_at":null,"body":"Introduced in [RFC 1183](https://github.com/rust-lang/rfcs/blob/master/text/1183-swap-out-jemalloc.md) these two crates lie underneath the facade with their tracking issue hooked up to https://github.com/rust-lang/rust/issues/27783. I'd like to open a separate issue for just these two crates.\r\n\r\nWe have a [request in Gecko](https://bugzilla.mozilla.org/show_bug.cgi?id=1163224#c36) to stabilize the ability to route allocations to specifically `malloc` (on all platforms). This includes Windows, where currently `alloc_system` routes to functions like `HeapAlloc`.\r\n\r\nEssentially, one of these crates, or perhaps a new crate like them, may want to have an accelerated path to stabilization before allocators themselves. For example I wouldn't want to stabilize `#![allocator]` or `#![needs_allocator]`, but we could stabilize the semantics of `extern crate alloc_malloc` redirects all allocations to malloc (for example).\r\n\r\nNominating for discussion!\r\n\r\ncc @rust-lang/libs \r\ncc @froydnj"},"comment":{"url":"https://api.github.com/repos/rust-lang/rust/issues/comments/212096914","html_url":"https://github.com/rust-lang/rust/issues/33082#issuecomment-212096914","issue_url":"https://api.github.com/repos/rust-lang/rust/issues/33082","id":212096914,"user":{"login":"nikomatsakis","id":155238,"avatar_url":"https://avatars.githubusercontent.com/u/155238?v=3","gravatar_id":"","url":"https://api.github.com/users/nikomatsakis","html_url":"https://github.com/nikomatsakis","followers_url":"https://api.github.com/users/nikomatsakis/followers","following_url":"https://api.github.com/users/nikomatsakis/following{/other_user}","gists_url":"https://api.github.com/users/nikomatsakis/gists{/gist_id}","starred_url":"https://api.github.com/users/nikomatsakis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nikomatsakis/subscriptions","organizations_url":"https://api.github.com/users/nikomatsakis/orgs","repos_url":"https://api.github.com/users/nikomatsakis/repos","events_url":"https://api.github.com/users/nikomatsakis/events{/privacy}","received_events_url":"https://api.github.com/users/nikomatsakis/received_events","type":"User","site_admin":false},"created_at":"2016-04-19T19:51:39Z","updated_at":"2016-04-19T19:51:39Z","body":"@aturon \r\n\r\n> I'm slightly uneasy with extern crate having these kind of behind-the-scenes effects, but I also don't immediately see a better mechanism.\r\n\r\nIt seems reasonable to have the idea of \"global language services\" that can be required and which can admit only one implementation. I wouldn't want this to be an expandable, user-defined set, since it's kind of anti-modular (unlike say a trait), but we do need SOME answer that permits someone to say \"gimme memory\" or \"panic\" without having to have the implementor in scope. Tying it to very special crates seems... ok to me. At least I too cannot directly think of an alternative.\r\n\r\nI guess I could imagine that merely adding the crate as an extern crate isn't enough, the app or somebody has to \"bless it\" for it to serve in its special role as a provider of that mechanism. But I'm not convincced that's valuable and it requires us to think up how it gets declared.\r\n\r\nIn any case, total composability of crates isn't really possible. For example, we already have the notion of `#[no_mangle]` functions and so forth. That is more-or-less the same thing, no?"}}