-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] Initial Rust language support with make #6162
Conversation
3d9ccc1
to
c3cf757
Compare
Indeed this seems less hacky. Is it still possible to somehow use cargo crates? |
The idea is to integrate rust into the existing build system as well as possible and to not use a separate buildsystem like cargo or xargo. Makefile.base has been modified to include support for main.rs and lib.rs files and a Makefile.rust has been added which sets a few rust related variables. This is very loosly based on RIOT-OS#5740
This package is needed to built rust applications with `#![no_std]`. We can't really use the rust standard library because it is too fat for our little MCUs.
Including an example file demonstrating how to use them.
c3cf757
to
46cd682
Compare
Not really. My idea was to allow users to integrate crates by adding a pkg for them in This is relevant because if you build rust creates with Even though including external crates as a package doesn't really work currently compiling crates does of cause work. The directories in But even if you would fix the dependency problem most cargo crates that you can find on crates.io wouldn't work with riot anyhow because most of them need libstd. |
I managed to integrate crates more closely into the existing |
Closes RIOT-OS#4
I'm opposed to not using the cargo/xargo infrastructure. Users developing with rust will now cargo, and their packaging system is actually quite nice. I suggest going with the linker hack now and rather try to get a "linker_args" option upstream, where we can just pass "$archives", which just get linked in using RIOT's build system. |
We made some progress with rust support on RIOT. We mirrored our master branch to a GitHub Repository (in case anybody wants to test it), this repository can be viewed here. We just integrated wrappers for sock and are now planning to rebase our changes against the current upstream master branch. If you want to experiment with rust on RIOT you should probably wait until we did that (it's scheduled for this weekend). Afterwards we will work on wrappers for coap and as soon as we are finished doing that we will make some changes to our buildsystem requested by @kaspar030. After all of that has been done this merge request will be updated. |
why ? |
This was closed by accident. We will reopen this shortly. In the meantime just use the beduino github repository if you are interested in playing around with rust. |
No new development for over a year. Let's close this for now. |
This is very loosly based on #5740 the main difference between #5740 and this pull request are that I integrated rust into the existing build system instead of depending on xargo or cargo. This has a bunch of advantages, for one thing it is now possible to build rust applications for the native family. Besides you don't need the
rust-linker-hook
hack.I am not so sure if it is a good idea to integrate the wrappers in
sys/rust
at this point. I am currently working on better wrappers for riot modules and newlibc.Anyways, let me know what you think…
I tested this with
BOARD=native
andBOARD=pba-d-01-kw2x
with gcc 6.2.Files in
dist/rust
have been slightly modified but where basically taken from #5740.