{"action":"created","issue":{"url":"https://api.github.com/repos/rust-lang/cargo/issues/2127","labels_url":"https://api.github.com/repos/rust-lang/cargo/issues/2127/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/cargo/issues/2127/comments","events_url":"https://api.github.com/repos/rust-lang/cargo/issues/2127/events","html_url":"https://github.com/rust-lang/cargo/pull/2127","id":115851532,"number":2127,"title":"Make Cargo obey platform-specific directory standards","user":{"login":"tbu-","id":6666593,"avatar_url":"https://avatars.githubusercontent.com/u/6666593?v=3","gravatar_id":"","url":"https://api.github.com/users/tbu-","html_url":"https://github.com/tbu-","followers_url":"https://api.github.com/users/tbu-/followers","following_url":"https://api.github.com/users/tbu-/following{/other_user}","gists_url":"https://api.github.com/users/tbu-/gists{/gist_id}","starred_url":"https://api.github.com/users/tbu-/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tbu-/subscriptions","organizations_url":"https://api.github.com/users/tbu-/orgs","repos_url":"https://api.github.com/users/tbu-/repos","events_url":"https://api.github.com/users/tbu-/events{/privacy}","received_events_url":"https://api.github.com/users/tbu-/received_events","type":"User","site_admin":false},"labels":[],"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":54,"created_at":"2015-11-09T10:49:33Z","updated_at":"2016-01-19T07:02:22Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/rust-lang/cargo/pulls/2127","html_url":"https://github.com/rust-lang/cargo/pull/2127","diff_url":"https://github.com/rust-lang/cargo/pull/2127.diff","patch_url":"https://github.com/rust-lang/cargo/pull/2127.patch"},"body":"Strategy for backward-compatiblity:\r\n\r\nWhen checking for the relevant Cargo directories, check in the following\r\norder of preference:\r\n\r\n1) Use the environment variable `CARGO_HOME`.\r\n2) Use the platform-specific directories if they exist.\r\n3) Use the legacy location (~/.cargo) if it exists.\r\n4) Fall back to the platform-specific directories if everything else fails.\r\n\r\nThe new platform-specific directories are as follows:\r\n\r\nOn Windows, use `AppData\\Local\\Temp\\Cargo` for cache files (obtained via\r\n`GetTempPath`), `AppData\\Roaming\\Cargo` for the config files\r\n(`FOLDERID_RoamingAppData`) and `AppData\\Local\\Programs\\Cargo` for\r\ninstalled binaries (`FOLDERID_UserProgramFiles`).\r\n\r\nOn Unixy systems, use the XDG spec: `~/.cache/cargo` for cache files,\r\n`~/.config/cargo` for config, `~/.local/bin` for installed binaries.\r\n\r\nhttp://standards.freedesktop.org/basedir-spec/basedir-spec-0.8.html\r\nhttp://www.freedesktop.org/software/systemd/man/file-hierarchy.html\r\n\r\nOn OS X, use `~/Library/Caches/Cargo` for cache files, `~/Library/Cargo`\r\nfor config files and `~/Library/Cargo/bin` for binary files.\r\n\r\nFixes #1734. Fixes #1976."},"comment":{"url":"https://api.github.com/repos/rust-lang/cargo/issues/comments/172759749","html_url":"https://github.com/rust-lang/cargo/pull/2127#issuecomment-172759749","issue_url":"https://api.github.com/repos/rust-lang/cargo/issues/2127","id":172759749,"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},"created_at":"2016-01-19T07:02:22Z","updated_at":"2016-01-19T07:02:22Z","body":"@brson we've actually already [got some custom code](https://github.com/rust-lang/cargo/blob/9ebfb9b6d2bad7f9640ae012fae686ceeab7b084/src/cargo/util/config.rs#L493-L506) to handle that case (e.g. the \"home directory\" is special).\r\n\r\nIf you put configuration in `~/.cargo/config` Cargo will just use it if you're working anywhere under `~` which is pretty likely. That'll just have more precedent than Cargo's platform-specific home directory.\r\n"}}