{"action":"created","issue":{"url":"https://api.github.com/repos/rust-lang/rfcs/issues/1291","labels_url":"https://api.github.com/repos/rust-lang/rfcs/issues/1291/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/rfcs/issues/1291/comments","events_url":"https://api.github.com/repos/rust-lang/rfcs/issues/1291/events","html_url":"https://github.com/rust-lang/rfcs/pull/1291","id":107845146,"number":1291,"title":"RFC: Promote the `libc` crate from the nursery","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/rfcs/labels/final-comment-period","name":"final-comment-period","color":"207de5"},{"url":"https://api.github.com/repos/rust-lang/rfcs/labels/T-libs","name":"T-libs","color":"bfd4f2"}],"state":"open","locked":false,"assignee":{"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},"milestone":null,"comments":53,"created_at":"2015-09-23T03:52:47Z","updated_at":"2015-10-20T02:42:21Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/rust-lang/rfcs/pulls/1291","html_url":"https://github.com/rust-lang/rfcs/pull/1291","diff_url":"https://github.com/rust-lang/rfcs/pull/1291.diff","patch_url":"https://github.com/rust-lang/rfcs/pull/1291.patch"},"body":"Move the `libc` crate into the `rust-lang` organization after applying changes\r\nsuch as:\r\n\r\n* Remove the internal organization of the crate in favor of just one flat\r\n  namespace at the top of the crate.\r\n* Set up a large number of CI builders to verify FFI bindings across many\r\n  platforms in an automatic fashion.\r\n* Define the scope of libc in terms of bindings it will provide for each\r\n  platform.\r\n\r\n[Rendered](https://github.com/alexcrichton/rfcs/blob/pomote-libc/text/0000-promote-libc.md)"},"comment":{"url":"https://api.github.com/repos/rust-lang/rfcs/issues/comments/149410963","html_url":"https://github.com/rust-lang/rfcs/pull/1291#issuecomment-149410963","issue_url":"https://api.github.com/repos/rust-lang/rfcs/issues/1291","id":149410963,"user":{"login":"mzabaluev","id":1198919,"avatar_url":"https://avatars.githubusercontent.com/u/1198919?v=3","gravatar_id":"","url":"https://api.github.com/users/mzabaluev","html_url":"https://github.com/mzabaluev","followers_url":"https://api.github.com/users/mzabaluev/followers","following_url":"https://api.github.com/users/mzabaluev/following{/other_user}","gists_url":"https://api.github.com/users/mzabaluev/gists{/gist_id}","starred_url":"https://api.github.com/users/mzabaluev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mzabaluev/subscriptions","organizations_url":"https://api.github.com/users/mzabaluev/orgs","repos_url":"https://api.github.com/users/mzabaluev/repos","events_url":"https://api.github.com/users/mzabaluev/events{/privacy}","received_events_url":"https://api.github.com/users/mzabaluev/received_events","type":"User","site_admin":false},"created_at":"2015-10-20T02:42:21Z","updated_at":"2015-10-20T02:42:21Z","body":"@retep998:\r\n> I am currently opposed to the line #[link(name = \"msvcrt\")] in libc. It should be rustc's job to choose which CRT to link in\r\n\r\nI'm not familiar with how rustc operates on Windows, but unless output executables and DLL are all linked with CRT, `libc` is the go-to crate to request a CRT to be linked, while hiding the actual linkage details from all other crates. This works similar to -sys crates for other foreign libraries. On Linux, there is a similar effect of getting a particular library DSO name baked in at link time, which is not directly controlled by the compiler options (nor is it with the C toolchain, where processing an `-l` flag typically hits a symbolic link to some particular version of the shared library).\r\n\r\nPerhaps the only place where the CRT DLL name can visibly leak into the Rust build system is the [links](http://doc.crates.io/build-script.html#the-links-manifest-key) key for Cargo, so special care needs to be taken there. The nursery project does not currently have `links`, and I think this is OK, as `libc` is not an ordinary -sys crate."}}