{"action":"created","comment":{"url":"https://api.github.com/repos/rust-lang/rfcs/pulls/comments/53123135","id":53123135,"diff_hunk":"@@ -0,0 +1,132 @@\n+- Feature Name: libstd_sys\n+- Start Date: 2016-02-16\n+- RFC PR: (leave this empty)\n+- Rust Issue: (leave this empty)\n+\n+# Summary\n+[summary]: #summary\n+\n+Refactor the standard library implementation in a backward-compatible way, such\n+that most platform-specific code resides in submodules of `std::sys`, one\n+submodule per platform, with the goal of making it easier to port the standard\n+library to systems much different than POSIX and Windows.\n+\n+# Motivation\n+[motivation]: #motivation\n+\n+Currently, the Rust standard library is organized such that large amounts of\n+platform-specific code coexists in the same modules as platform-independent\n+code, and the code for different platforms is interspersed. When adding a new\n+platform to Rust, one must add or change code in many different modules to\n+support the new platform.\n+\n+With the current state of libstd, it is hard to see which parts depend on\n+external operating-system provided libraries like libc, libpthread, etc. This in\n+turn makes it difficult to begin work on implementing the standard library\n+without using these libraries. For example, it is hard to determine whether it\n+is better for the pc-windows-mscv targets to use libc or whether they should","path":"text/0000-libstd-sys.md","position":27,"original_position":27,"commit_id":"14475bfa941c044a811efe2785cabfd33ac1b86b","original_commit_id":"14475bfa941c044a811efe2785cabfd33ac1b86b","user":{"login":"arcnmx","id":13426784,"avatar_url":"https://avatars.githubusercontent.com/u/13426784?v=3","gravatar_id":"","url":"https://api.github.com/users/arcnmx","html_url":"https://github.com/arcnmx","followers_url":"https://api.github.com/users/arcnmx/followers","following_url":"https://api.github.com/users/arcnmx/following{/other_user}","gists_url":"https://api.github.com/users/arcnmx/gists{/gist_id}","starred_url":"https://api.github.com/users/arcnmx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arcnmx/subscriptions","organizations_url":"https://api.github.com/users/arcnmx/orgs","repos_url":"https://api.github.com/users/arcnmx/repos","events_url":"https://api.github.com/users/arcnmx/events{/privacy}","received_events_url":"https://api.github.com/users/arcnmx/received_events","type":"User","site_admin":false},"body":"of course you would be the one to find that..!","created_at":"2016-02-17T05:44:28Z","updated_at":"2016-02-17T05:44:28Z","html_url":"https://github.com/rust-lang/rfcs/pull/1502#discussion_r53123135","pull_request_url":"https://api.github.com/repos/rust-lang/rfcs/pulls/1502","_links":{"self":{"href":"https://api.github.com/repos/rust-lang/rfcs/pulls/comments/53123135"},"html":{"href":"https://github.com/rust-lang/rfcs/pull/1502#discussion_r53123135"},"pull_request":{"href":"https://api.github.com/repos/rust-lang/rfcs/pulls/1502"}}},"pull_request":{"url":"https://api.github.com/repos/rust-lang/rfcs/pulls/1502","id":59573101,"html_url":"https://github.com/rust-lang/rfcs/pull/1502","diff_url":"https://github.com/rust-lang/rfcs/pull/1502.diff","patch_url":"https://github.com/rust-lang/rfcs/pull/1502.patch","issue_url":"https://api.github.com/repos/rust-lang/rfcs/issues/1502","number":1502,"state":"open","locked":false,"title":"libstd::sys, the great libstd refactor","user":{"login":"arcnmx","id":13426784,"avatar_url":"https://avatars.githubusercontent.com/u/13426784?v=3","gravatar_id":"","url":"https://api.github.com/users/arcnmx","html_url":"https://github.com/arcnmx","followers_url":"https://api.github.com/users/arcnmx/followers","following_url":"https://api.github.com/users/arcnmx/following{/other_user}","gists_url":"https://api.github.com/users/arcnmx/gists{/gist_id}","starred_url":"https://api.github.com/users/arcnmx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arcnmx/subscriptions","organizations_url":"https://api.github.com/users/arcnmx/orgs","repos_url":"https://api.github.com/users/arcnmx/repos","events_url":"https://api.github.com/users/arcnmx/events{/privacy}","received_events_url":"https://api.github.com/users/arcnmx/received_events","type":"User","site_admin":false},"body":"A proposal to refactor the platform-dependent parts of `libstd` into a form that is better suited for porting to new platforms. The idea is to isolate the functionality we require from the underlying OS (basically, a thin abstraction over libc) into a well-defined interface that can be filled out easily by any platform. Thanks go to @briansmith for helping me draft this up.\r\n\r\nSee https://internals.rust-lang.org/t/libsystem-or-the-great-libstd-refactor/2765 for previous discussions and context.\r\n\r\n[Rendered](https://github.com/arcnmx/rust-rfcs/blob/libstd-sys/text/0000-libstd-sys.md)","created_at":"2016-02-16T23:34:47Z","updated_at":"2016-02-17T05:44:28Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1434e7ae557357685432492272afa22c72d6df87","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/rust-lang/rfcs/pulls/1502/commits","review_comments_url":"https://api.github.com/repos/rust-lang/rfcs/pulls/1502/comments","review_comment_url":"https://api.github.com/repos/rust-lang/rfcs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rust-lang/rfcs/issues/1502/comments","statuses_url":"https://api.github.com/repos/rust-lang/rfcs/statuses/14475bfa941c044a811efe2785cabfd33ac1b86b","head":{"label":"arcnmx:libstd-sys","ref":"libstd-sys","sha":"14475bfa941c044a811efe2785cabfd33ac1b86b","user":{"login":"arcnmx","id":13426784,"avatar_url":"https://avatars.githubusercontent.com/u/13426784?v=3","gravatar_id":"","url":"https://api.github.com/users/arcnmx","html_url":"https://github.com/arcnmx","followers_url":"https://api.github.com/users/arcnmx/followers","following_url":"https://api.github.com/users/arcnmx/following{/other_user}","gists_url":"https://api.github.com/users/arcnmx/gists{/gist_id}","starred_url":"https://api.github.com/users/arcnmx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arcnmx/subscriptions","organizations_url":"https://api.github.com/users/arcnmx/orgs","repos_url":"https://api.github.com/users/arcnmx/repos","events_url":"https://api.github.com/users/arcnmx/events{/privacy}","received_events_url":"https://api.github.com/users/arcnmx/received_events","type":"User","site_admin":false},"repo":{"id":44270961,"name":"rust-rfcs","full_name":"arcnmx/rust-rfcs","owner":{"login":"arcnmx","id":13426784,"avatar_url":"https://avatars.githubusercontent.com/u/13426784?v=3","gravatar_id":"","url":"https://api.github.com/users/arcnmx","html_url":"https://github.com/arcnmx","followers_url":"https://api.github.com/users/arcnmx/followers","following_url":"https://api.github.com/users/arcnmx/following{/other_user}","gists_url":"https://api.github.com/users/arcnmx/gists{/gist_id}","starred_url":"https://api.github.com/users/arcnmx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arcnmx/subscriptions","organizations_url":"https://api.github.com/users/arcnmx/orgs","repos_url":"https://api.github.com/users/arcnmx/repos","events_url":"https://api.github.com/users/arcnmx/events{/privacy}","received_events_url":"https://api.github.com/users/arcnmx/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/arcnmx/rust-rfcs","description":"RFCs for changes to Rust","fork":true,"url":"https://api.github.com/repos/arcnmx/rust-rfcs","forks_url":"https://api.github.com/repos/arcnmx/rust-rfcs/forks","keys_url":"https://api.github.com/repos/arcnmx/rust-rfcs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/arcnmx/rust-rfcs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/arcnmx/rust-rfcs/teams","hooks_url":"https://api.github.com/repos/arcnmx/rust-rfcs/hooks","issue_events_url":"https://api.github.com/repos/arcnmx/rust-rfcs/issues/events{/number}","events_url":"https://api.github.com/repos/arcnmx/rust-rfcs/events","assignees_url":"https://api.github.com/repos/arcnmx/rust-rfcs/assignees{/user}","branches_url":"https://api.github.com/repos/arcnmx/rust-rfcs/branches{/branch}","tags_url":"https://api.github.com/repos/arcnmx/rust-rfcs/tags","blobs_url":"https://api.github.com/repos/arcnmx/rust-rfcs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/arcnmx/rust-rfcs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/arcnmx/rust-rfcs/git/refs{/sha}","trees_url":"https://api.github.com/repos/arcnmx/rust-rfcs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/arcnmx/rust-rfcs/statuses/{sha}","languages_url":"https://api.github.com/repos/arcnmx/rust-rfcs/languages","stargazers_url":"https://api.github.com/repos/arcnmx/rust-rfcs/stargazers","contributors_url":"https://api.github.com/repos/arcnmx/rust-rfcs/contributors","subscribers_url":"https://api.github.com/repos/arcnmx/rust-rfcs/subscribers","subscription_url":"https://api.github.com/repos/arcnmx/rust-rfcs/subscription","commits_url":"https://api.github.com/repos/arcnmx/rust-rfcs/commits{/sha}","git_commits_url":"https://api.github.com/repos/arcnmx/rust-rfcs/git/commits{/sha}","comments_url":"https://api.github.com/repos/arcnmx/rust-rfcs/comments{/number}","issue_comment_url":"https://api.github.com/repos/arcnmx/rust-rfcs/issues/comments{/number}","contents_url":"https://api.github.com/repos/arcnmx/rust-rfcs/contents/{+path}","compare_url":"https://api.github.com/repos/arcnmx/rust-rfcs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/arcnmx/rust-rfcs/merges","archive_url":"https://api.github.com/repos/arcnmx/rust-rfcs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/arcnmx/rust-rfcs/downloads","issues_url":"https://api.github.com/repos/arcnmx/rust-rfcs/issues{/number}","pulls_url":"https://api.github.com/repos/arcnmx/rust-rfcs/pulls{/number}","milestones_url":"https://api.github.com/repos/arcnmx/rust-rfcs/milestones{/number}","notifications_url":"https://api.github.com/repos/arcnmx/rust-rfcs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/arcnmx/rust-rfcs/labels{/name}","releases_url":"https://api.github.com/repos/arcnmx/rust-rfcs/releases{/id}","deployments_url":"https://api.github.com/repos/arcnmx/rust-rfcs/deployments","created_at":"2015-10-14T19:22:24Z","updated_at":"2016-02-16T22:26:15Z","pushed_at":"2016-02-16T23:24:53Z","git_url":"git://github.com/arcnmx/rust-rfcs.git","ssh_url":"git@github.com:arcnmx/rust-rfcs.git","clone_url":"https://github.com/arcnmx/rust-rfcs.git","svn_url":"https://github.com/arcnmx/rust-rfcs","homepage":"","size":2535,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"rust-lang:master","ref":"master","sha":"1fea0c8b49d622351bf24f2e7bab25667821eb2d","user":{"login":"rust-lang","id":5430905,"avatar_url":"https://avatars.githubusercontent.com/u/5430905?v=3","gravatar_id":"","url":"https://api.github.com/users/rust-lang","html_url":"https://github.com/rust-lang","followers_url":"https://api.github.com/users/rust-lang/followers","following_url":"https://api.github.com/users/rust-lang/following{/other_user}","gists_url":"https://api.github.com/users/rust-lang/gists{/gist_id}","starred_url":"https://api.github.com/users/rust-lang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rust-lang/subscriptions","organizations_url":"https://api.github.com/users/rust-lang/orgs","repos_url":"https://api.github.com/users/rust-lang/repos","events_url":"https://api.github.com/users/rust-lang/events{/privacy}","received_events_url":"https://api.github.com/users/rust-lang/received_events","type":"Organization","site_admin":false},"repo":{"id":17527989,"name":"rfcs","full_name":"rust-lang/rfcs","owner":{"login":"rust-lang","id":5430905,"avatar_url":"https://avatars.githubusercontent.com/u/5430905?v=3","gravatar_id":"","url":"https://api.github.com/users/rust-lang","html_url":"https://github.com/rust-lang","followers_url":"https://api.github.com/users/rust-lang/followers","following_url":"https://api.github.com/users/rust-lang/following{/other_user}","gists_url":"https://api.github.com/users/rust-lang/gists{/gist_id}","starred_url":"https://api.github.com/users/rust-lang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rust-lang/subscriptions","organizations_url":"https://api.github.com/users/rust-lang/orgs","repos_url":"https://api.github.com/users/rust-lang/repos","events_url":"https://api.github.com/users/rust-lang/events{/privacy}","received_events_url":"https://api.github.com/users/rust-lang/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rust-lang/rfcs","description":"RFCs for changes to Rust","fork":false,"url":"https://api.github.com/repos/rust-lang/rfcs","forks_url":"https://api.github.com/repos/rust-lang/rfcs/forks","keys_url":"https://api.github.com/repos/rust-lang/rfcs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rust-lang/rfcs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rust-lang/rfcs/teams","hooks_url":"https://api.github.com/repos/rust-lang/rfcs/hooks","issue_events_url":"https://api.github.com/repos/rust-lang/rfcs/issues/events{/number}","events_url":"https://api.github.com/repos/rust-lang/rfcs/events","assignees_url":"https://api.github.com/repos/rust-lang/rfcs/assignees{/user}","branches_url":"https://api.github.com/repos/rust-lang/rfcs/branches{/branch}","tags_url":"https://api.github.com/repos/rust-lang/rfcs/tags","blobs_url":"https://api.github.com/repos/rust-lang/rfcs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rust-lang/rfcs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rust-lang/rfcs/git/refs{/sha}","trees_url":"https://api.github.com/repos/rust-lang/rfcs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rust-lang/rfcs/statuses/{sha}","languages_url":"https://api.github.com/repos/rust-lang/rfcs/languages","stargazers_url":"https://api.github.com/repos/rust-lang/rfcs/stargazers","contributors_url":"https://api.github.com/repos/rust-lang/rfcs/contributors","subscribers_url":"https://api.github.com/repos/rust-lang/rfcs/subscribers","subscription_url":"https://api.github.com/repos/rust-lang/rfcs/subscription","commits_url":"https://api.github.com/repos/rust-lang/rfcs/commits{/sha}","git_commits_url":"https://api.github.com/repos/rust-lang/rfcs/git/commits{/sha}","comments_url":"https://api.github.com/repos/rust-lang/rfcs/comments{/number}","issue_comment_url":"https://api.github.com/repos/rust-lang/rfcs/issues/comments{/number}","contents_url":"https://api.github.com/repos/rust-lang/rfcs/contents/{+path}","compare_url":"https://api.github.com/repos/rust-lang/rfcs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rust-lang/rfcs/merges","archive_url":"https://api.github.com/repos/rust-lang/rfcs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rust-lang/rfcs/downloads","issues_url":"https://api.github.com/repos/rust-lang/rfcs/issues{/number}","pulls_url":"https://api.github.com/repos/rust-lang/rfcs/pulls{/number}","milestones_url":"https://api.github.com/repos/rust-lang/rfcs/milestones{/number}","notifications_url":"https://api.github.com/repos/rust-lang/rfcs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rust-lang/rfcs/labels{/name}","releases_url":"https://api.github.com/repos/rust-lang/rfcs/releases{/id}","deployments_url":"https://api.github.com/repos/rust-lang/rfcs/deployments","created_at":"2014-03-07T21:29:00Z","updated_at":"2016-02-16T08:06:24Z","pushed_at":"2016-02-16T23:34:48Z","git_url":"git://github.com/rust-lang/rfcs.git","ssh_url":"git@github.com:rust-lang/rfcs.git","clone_url":"https://github.com/rust-lang/rfcs.git","svn_url":"https://github.com/rust-lang/rfcs","homepage":"","size":4968,"stargazers_count":553,"watchers_count":553,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":271,"mirror_url":null,"open_issues_count":625,"forks":271,"open_issues":625,"watchers":553,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rust-lang/rfcs/pulls/1502"},"html":{"href":"https://github.com/rust-lang/rfcs/pull/1502"},"issue":{"href":"https://api.github.com/repos/rust-lang/rfcs/issues/1502"},"comments":{"href":"https://api.github.com/repos/rust-lang/rfcs/issues/1502/comments"},"review_comments":{"href":"https://api.github.com/repos/rust-lang/rfcs/pulls/1502/comments"},"review_comment":{"href":"https://api.github.com/repos/rust-lang/rfcs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rust-lang/rfcs/pulls/1502/commits"},"statuses":{"href":"https://api.github.com/repos/rust-lang/rfcs/statuses/14475bfa941c044a811efe2785cabfd33ac1b86b"}}}}