{"action":"created","issue":{"url":"https://api.github.com/repos/rust-lang/cargo/issues/1784","labels_url":"https://api.github.com/repos/rust-lang/cargo/issues/1784/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/cargo/issues/1784/comments","events_url":"https://api.github.com/repos/rust-lang/cargo/issues/1784/events","html_url":"https://github.com/rust-lang/cargo/issues/1784","id":93116028,"number":1784,"title":"Manifest field to select default build targets for project.","user":{"login":"aXe1","id":276515,"avatar_url":"https://avatars.githubusercontent.com/u/276515?v=3","gravatar_id":"","url":"https://api.github.com/users/aXe1","html_url":"https://github.com/aXe1","followers_url":"https://api.github.com/users/aXe1/followers","following_url":"https://api.github.com/users/aXe1/following{/other_user}","gists_url":"https://api.github.com/users/aXe1/gists{/gist_id}","starred_url":"https://api.github.com/users/aXe1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aXe1/subscriptions","organizations_url":"https://api.github.com/users/aXe1/orgs","repos_url":"https://api.github.com/users/aXe1/repos","events_url":"https://api.github.com/users/aXe1/events{/privacy}","received_events_url":"https://api.github.com/users/aXe1/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-07-05T14:26:30Z","updated_at":"2015-07-06T11:17:53Z","closed_at":"2015-07-05T16:50:43Z","body":"It would be nice to have a field in manifest for selecting default build targets.\r\n#### Use case 1\r\nI have a project with support for 3 targets. Just now I have to manually ask cargo to build one:\r\n```cargo build --target=<triplet>```\r\nFor testing purpose and production it is reasonable to build for all platforms (as example). And now it would be 3 calls to Cargo. But when I debug one of them I do not need neither all of then, nor cargo current default.\r\n#### Use case 2\r\nFor project with only one (cross-compiling) target (such as arm-linux-androideabi), we also have to specify target by hand every time we use cargo. But it's project specific, so it should be in `Cargo.toml`, I think."},"comment":{"url":"https://api.github.com/repos/rust-lang/cargo/issues/comments/118822725","html_url":"https://github.com/rust-lang/cargo/issues/1784#issuecomment-118822725","issue_url":"https://api.github.com/repos/rust-lang/cargo/issues/1784","id":118822725,"user":{"login":"aXe1","id":276515,"avatar_url":"https://avatars.githubusercontent.com/u/276515?v=3","gravatar_id":"","url":"https://api.github.com/users/aXe1","html_url":"https://github.com/aXe1","followers_url":"https://api.github.com/users/aXe1/followers","following_url":"https://api.github.com/users/aXe1/following{/other_user}","gists_url":"https://api.github.com/users/aXe1/gists{/gist_id}","starred_url":"https://api.github.com/users/aXe1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aXe1/subscriptions","organizations_url":"https://api.github.com/users/aXe1/orgs","repos_url":"https://api.github.com/users/aXe1/repos","events_url":"https://api.github.com/users/aXe1/events{/privacy}","received_events_url":"https://api.github.com/users/aXe1/received_events","type":"User","site_admin":false},"created_at":"2015-07-06T11:17:53Z","updated_at":"2015-07-06T11:17:53Z","body":"It isn't critical, I agree. But I don't understand enough: if Cargo is a package manager, then why (ideally) should I need additional script for build process? Also similar entities for other languages has that feature. Proofs: Ruby's [RubyGems](http://guides.rubygems.org/specification-reference/#platform=), Ruby's [Bundler](http://bundler.io/v1.3/man/gemfile.5.html) (see \"PLATFORMS (:platforms)\" section), Python's [PIP](https://www.python.org/dev/peps/pep-0425/#id13), Haskell's [Cabal](https://www.haskell.org/cabal/users-guide/developing-packages.html#meaning-of-field-values-when-using-conditionals) (See \"Conditions\" in \"Configuration\" section)."}}