{"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/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":17,"created_at":"2015-09-23T03:52:47Z","updated_at":"2015-09-29T05:45:10Z","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/143951356","html_url":"https://github.com/rust-lang/rfcs/pull/1291#issuecomment-143951356","issue_url":"https://api.github.com/repos/rust-lang/rfcs/issues/1291","id":143951356,"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-09-29T05:45:10Z","updated_at":"2015-09-29T05:45:10Z","body":"I expect that manual editing of target-specific definitions will leave room for error, even with the general intent to back it up with tests. To validate the data type definitions it's necessary to test correct functionality of some C API functions that use the data types, which may not be feasible for all APIs without imposing particular requirements on the test environment, such as filesystem, configuration of the network, DNS etc. Testing structure fields, bit flags, or enum constants may need a lot of care to isolate the effect of each definition.\r\n\r\nA more practical approach in the long term would be to generate the FFI definitions per target from the system C headers, and only edit the public reexports manually. The generated code for all supported targets would still be checked into git, but there should be tools to update it for a specific target when needed."}}