1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
Commit Graph

22 Commits

Author SHA1 Message Date
chrysn
d260ec88a6 makefiles: Add "cargo-command" target for executing cargo
Examples of executed commands are `cargo check`, `cargo fix` or `cargo
doc`.
2024-08-22 15:16:41 +02:00
chrysn
184ffc89ab makefiles: Align cargo build command's setup with upcoming cargo-command 2024-08-21 21:20:46 +02:00
chrysn
8d30b00dd1 makefiles: Split Rust related checks out from building target 2024-08-21 20:40:08 +02:00
Marian Buschsieweke
663b74cb7c
markfiles/cargo-targets.inc.mk: Drop legacy triple
The legacy `riscv-none-embed` target triple is incorrect and the
toolchain using it has long been obsolete. With our CI no longer
using the obsolete toolchain, there is no need to handle that one
anymore.
2024-02-12 20:40:31 +01:00
chrysn
9a59d59bd2 makefiles/rust: Remove RIOT_USEMODULE
The latest versions of riot-wrappers and riot-sys do not require it any
more, and the exported data from info-rust is thus much more stable.
2024-02-01 13:54:46 +01:00
chrysn
740f7c7708 makefiles/rust: Silence checks in QUIET=0 mode
The checks would print their prominently colored warnings and confuse
users, and the comments are more geared to those editing the Makefiles
than to those watching which commands get executed.
2024-01-31 16:13:34 +01:00
chrysn
6724884b93 makefiles/rust: Remove CARGO_CHANNEL special casing
Back when specific control of the Rust version used with RIOT was
needed, CARGO_CHANNEL was added to explicitly set the Rust version with
consideration for CI special cases.

Rust's mechansims of selecting a toolchain can be used instead now.
2024-01-31 12:25:09 +01:00
chrysn
e98d3a5d3a makefiles/rust: Use --profile as was stabilized already in Rust 1.51 2024-01-31 12:25:06 +01:00
6fb226d5a2 make: pass make jobserver to cargo 2023-01-26 21:43:39 +01:00
Marian Buschsieweke
4a00835415
makefiles/cargo-targets.inc.mk: Fix RISC-V target
Update the list of target triples to match
`makefiles/arch/riscv.inc.mk`. This fixes compilation with toolchains
other than the obsolete toolchain that uses the incorrect
`riscv-none-embed` triple.
2023-01-09 20:36:52 +01:00
chrysn
269b33f01a makefiles: Use grep -q rather than --quiet
`--quiet` is a GNUism; Alpine's busybox grep only supports the minimal
-q option required by POSIX.
2022-11-14 09:51:19 +01:00
chrysn
ec5d75f965 makefiles: Remove duplicate cargo invocation
Back in 36a029c0, rather than being line wrapped, this was duplicated.
2022-09-23 02:05:32 +02:00
chrysn
ebfa6f61d6 shell/democommands: Add example Rust module 2022-07-10 21:27:12 +02:00
chrysn
841e4deee5 lsm303agr: New sensor driver using external Rust crate
It is enabled by saul_default on microbit-v2.

Co-authored-by: Marian Buschsieweke <marian.buschsieweke@ovgu.de>
2022-07-10 21:27:12 +02:00
chrysn
ba76c6ee65 Rust: Add crates-to-module adapter 2022-07-09 21:15:29 +02:00
chrysn
54fe5fc8c3 makefiles/rust: Extra checks to ensure a usable build environment
... and print actionable errors.

Closes: https://github.com/RIOT-OS/RIOT/issues/18200
2022-06-16 16:23:02 +02:00
chrysn
36a029c07a makefiles/rust: Line wrap for better readability 2022-06-16 16:15:22 +02:00
chrysn
d129f3dc31 makefiles/rust: Colorful error output 2022-06-16 16:14:39 +02:00
chrysn
95cef2229c makefiles/rust: Err before trying to build without having the libraries in place
This is also a workaround for Rust's [97685], but primarily to enhance
the error message by pointing out that -Zbuild-std is an option, and
generally presenting the error as RIOT usually does.

[97685]: https://github.com/rust-lang/rust/issues/97685
2022-06-16 16:14:34 +02:00
8fc49b25f7 make: create cargo folders 2022-05-10 21:25:20 +02:00
chrysn
d391b1c5f4 cpu/riscv_common: Enable Rust applications
This contains a workaround for
https://github.com/rust-lang/rust-bindgen/issues/1555 (withouot which
bindgen would fail, with little information helping remedy the cause)
2022-01-14 13:42:32 +01:00
chrysn
732c369b7e makefiles: Add mechanism to build modules through Cargo
... and to dissect the static libraries into invidial .o files to link
them the same way we link C.
2021-12-14 13:27:41 +01:00