{"action":"created","issue":{"url":"https://api.github.com/repos/helena-project/tock/issues/90","repository_url":"https://api.github.com/repos/helena-project/tock","labels_url":"https://api.github.com/repos/helena-project/tock/issues/90/labels{/name}","comments_url":"https://api.github.com/repos/helena-project/tock/issues/90/comments","events_url":"https://api.github.com/repos/helena-project/tock/issues/90/events","html_url":"https://github.com/helena-project/tock/pull/90","id":170766897,"number":90,"title":"Build using Cargo","user":{"login":"alevy","id":4689,"avatar_url":"https://avatars.githubusercontent.com/u/4689?v=3","gravatar_id":"","url":"https://api.github.com/users/alevy","html_url":"https://github.com/alevy","followers_url":"https://api.github.com/users/alevy/followers","following_url":"https://api.github.com/users/alevy/following{/other_user}","gists_url":"https://api.github.com/users/alevy/gists{/gist_id}","starred_url":"https://api.github.com/users/alevy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alevy/subscriptions","organizations_url":"https://api.github.com/users/alevy/orgs","repos_url":"https://api.github.com/users/alevy/repos","events_url":"https://api.github.com/users/alevy/events{/privacy}","received_events_url":"https://api.github.com/users/alevy/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-08-11T23:01:52Z","updated_at":"2016-08-12T00:01:35Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/helena-project/tock/pulls/90","html_url":"https://github.com/helena-project/tock/pull/90","diff_url":"https://github.com/helena-project/tock/pull/90.diff","patch_url":"https://github.com/helena-project/tock/pull/90.patch"},"body":"_In progress: still not ported to the NRF, still no documentation, and need to add travis-ci targets. Don't merge_\r\n\r\nAnother fairly large but (mostly) uninteresting change-set.\r\n\r\nSwitches to using Cargo for dependency management and building of the kernel. For the most part, this simply involves moving files in each crate to the locations Cargo expects them to be -- into a `src` subdirectory` and creating a `Cargo.toml` file.\r\n\r\nThere are two main subtelties:\r\n\r\n  1. Actually building an ELF requires making sure that the right arguments are passed to `rustc` from cargo: `-Z no-landing-pads` for all invocations of `rustc` and `-C lto` for the final invocation to build an ELF. To do this we use the `rustflags` variable in `.cargo/config` and build the platform crate with `cargo rustc` which allows us to pass arguments to the final invocation of `rustc` - a Makefile in the platform crate manages this.\r\n\r\n  2. Using a the right linker (we want `arm-none-eabi-gcc`) and pass proper arguments to it. These are encoded in the chip specific `target.json` file now. One sub-subtlety is that the linker script lives in the source directory of the chip specific crate, but needs to be used in the link phase of the platform crate. To manage this, we use a custom `build.rs` build step (called by Cargo) to copy the linker script into the final target build directory, so we can reference it relative wherever we're building from."},"comment":{"url":"https://api.github.com/repos/helena-project/tock/issues/comments/239328953","html_url":"https://github.com/helena-project/tock/pull/90#issuecomment-239328953","issue_url":"https://api.github.com/repos/helena-project/tock/issues/90","id":239328953,"user":{"login":"steveklabnik","id":27786,"avatar_url":"https://avatars.githubusercontent.com/u/27786?v=3","gravatar_id":"","url":"https://api.github.com/users/steveklabnik","html_url":"https://github.com/steveklabnik","followers_url":"https://api.github.com/users/steveklabnik/followers","following_url":"https://api.github.com/users/steveklabnik/following{/other_user}","gists_url":"https://api.github.com/users/steveklabnik/gists{/gist_id}","starred_url":"https://api.github.com/users/steveklabnik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/steveklabnik/subscriptions","organizations_url":"https://api.github.com/users/steveklabnik/orgs","repos_url":"https://api.github.com/users/steveklabnik/repos","events_url":"https://api.github.com/users/steveklabnik/events{/privacy}","received_events_url":"https://api.github.com/users/steveklabnik/received_events","type":"User","site_admin":false},"created_at":"2016-08-12T00:01:35Z","updated_at":"2016-08-12T00:01:35Z","body":"Oh! What Rust are you on now? If you're on a new Rust, then you should be using `panic=abort` over `-Z no-landing-pads`, but that can always just be a different PR."}}
{"actor":{"display_login":"steveklabnik"}}