{"action":"created","issue":{"url":"https://api.github.com/repos/rust-lang/cargo/issues/2552","repository_url":"https://api.github.com/repos/rust-lang/cargo","labels_url":"https://api.github.com/repos/rust-lang/cargo/issues/2552/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/cargo/issues/2552/comments","events_url":"https://api.github.com/repos/rust-lang/cargo/issues/2552/events","html_url":"https://github.com/rust-lang/cargo/issues/2552","id":146952970,"number":2552,"title":"cargo install <library_name> --library","user":{"login":"sjmackenzie","id":158321,"avatar_url":"https://avatars.githubusercontent.com/u/158321?v=3","gravatar_id":"","url":"https://api.github.com/users/sjmackenzie","html_url":"https://github.com/sjmackenzie","followers_url":"https://api.github.com/users/sjmackenzie/followers","following_url":"https://api.github.com/users/sjmackenzie/following{/other_user}","gists_url":"https://api.github.com/users/sjmackenzie/gists{/gist_id}","starred_url":"https://api.github.com/users/sjmackenzie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sjmackenzie/subscriptions","organizations_url":"https://api.github.com/users/sjmackenzie/orgs","repos_url":"https://api.github.com/users/sjmackenzie/repos","events_url":"https://api.github.com/users/sjmackenzie/events{/privacy}","received_events_url":"https://api.github.com/users/sjmackenzie/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/rust-lang/cargo/labels/A-features","name":"A-features","color":"fbca04"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-04-08T15:01:18Z","updated_at":"2016-04-08T21:09:36Z","closed_at":null,"body":"Platform: Nixos\r\n\r\nIt would be really nice to be able to issue the command `cargo install <library name>`\r\nOr at least allow for installing of libraries by explicitly appending `--library` i.e. `cargo install <library_name> --library`\r\n\r\nWe currently have an issue, in that a crate and all its dependencies are compiled to a unique folder name, in the form of `/nix/store/<hash>-shared_object_name`. \r\nNow if we change a single line of the code, the code and all the dependencies will be recompiled and put in a new folder i.e. `/nix/store/<new-hash>-shared_object_name`.\r\n\r\nThus it makes using crates with large dependencies such as `piston`, a pain, as each time we change code, the resulting compile time can be over a minute.\r\n\r\nHence I'd like to split out the dependencies of each crate and put them into their own folder i.e. `/nix/store/<hash>-dependency1_name` and make use of the `.cargo/config` to override the `.toml` dependencies to `/nix/store/<hash>-dependency1_name`, so that they are not recompiled each time I change a line of code in my `shared object`.\r\n"},"comment":{"url":"https://api.github.com/repos/rust-lang/cargo/issues/comments/207607467","html_url":"https://github.com/rust-lang/cargo/issues/2552#issuecomment-207607467","issue_url":"https://api.github.com/repos/rust-lang/cargo/issues/2552","id":207607467,"user":{"login":"sjmackenzie","id":158321,"avatar_url":"https://avatars.githubusercontent.com/u/158321?v=3","gravatar_id":"","url":"https://api.github.com/users/sjmackenzie","html_url":"https://github.com/sjmackenzie","followers_url":"https://api.github.com/users/sjmackenzie/followers","following_url":"https://api.github.com/users/sjmackenzie/following{/other_user}","gists_url":"https://api.github.com/users/sjmackenzie/gists{/gist_id}","starred_url":"https://api.github.com/users/sjmackenzie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sjmackenzie/subscriptions","organizations_url":"https://api.github.com/users/sjmackenzie/orgs","repos_url":"https://api.github.com/users/sjmackenzie/repos","events_url":"https://api.github.com/users/sjmackenzie/events{/privacy}","received_events_url":"https://api.github.com/users/sjmackenzie/received_events","type":"User","site_admin":false},"created_at":"2016-04-08T21:09:36Z","updated_at":"2016-04-08T21:09:36Z","body":"Here is an example of where we copy the output to the `$out` folder: https://github.com/fractalide/fractalide/blob/master/build-support/buildFractalideComponent.nix#L109-L114\r\n\r\n(I just noticed the indentation on those sections is buggered, I'll fix it shortly.)"}}