-
Notifications
You must be signed in to change notification settings - Fork 109
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
[RFC] Build systems improvements #162
Comments
Improvement suggestions:
Additional thoughts:
|
I disagree with this. These two tools solve different problems, and each tools should solve the problem it is good at. Cargo is very good at building & testing rust code. Make is good at executing arbitrary recipes, encapsulating arbitrary configuration complexity, and acting as a job runner (these jobs can include building sources, but they do not need to, and there is no reason to re-write the rules that cargo already knows in make). I also agree with everything @bradjc suggested [especially (2), so much (2). Hidden files that drive configuration are the worst, most evil, awful, cruel, anti-feature ever crafted by humanity]. |
After the long discussions about the build system I think that the current compromise looks as follows:
The effect of this is that we have convenient solutions for these large groups and I lean towards keeping this (I think it is impossible to convince Rust users to use Makefiles, likewise it is impossible to convince someone using Makefiles for years to stop doing this). |
I would be very upset if a Makefile made permanent changes to my system without asking or telling me. The
Makes sense, this has confused me a few times.
Agreed. That is a good idea.
This is slow though. It wastes time building everything, when I only want one thing. Maybe the default |
Could we address the concerns about
+1, I tried sandboxing Tock's build system in tock-on-titan but doing so is very difficult (poor sandboxing tools in GNU/Linux...). |
I'm not sure if symlinks are any clearer, it's just another level of indirection. |
What about inlining everything (--target, deny warnings, ...) inside the Makefiles and keeping (+documenting) the config for everyone who wants to use cargo instead of Makefiles. Another option would be to gitignore the cargo config and putting it to a folder so everyone can opt-in in a Makefile-free build system, if desired. |
Hi, I think it's related with Tock System as a whole (not only Libtock-rs) but, Why not implement it's development system as a framework tool? I explain, look for example ionic, or expo.dev, two frameworks for mobile phone hybrid app development. We could use only single executable, and it can prepare your dependencies, install components, choose versions, environments, flash, etc. As I Imagine (python):
Everything based in Makefiles, cargo, .toml, etc. But centralized cheers, and cool project! |
Update Summer 2023
Some progress is underway to update the build system since this issue was originally opened.
Status: we still use cargo + make and probably will continue to.
New requirements
In addition to what was originally mentioned, we want:
TODO
cargo run
invocations. #490)make tab
as an approach to build for multiple locations #482)Original RFC
Background
In order to split out the discussion about the build system of
libtock-rs
from the PR #161 this issue was created.To organize this discussion I want to collect the requirements for a build system in this issue.
Current status
Currently building and flashing is done using
cargo
, Rust's build system and dependency manager. This is considered partially unsatisfying. Currently, the command line needed for compiling and flashing the nrf52 board isRunning the (unit) tests works via:
cargo test --workspace
However, some use cases are more difficult to tackle and require additional effort. One example is running integration tests, where currently an external test runner is used: #158
Requirements
A (non-comprehensive) list of requirements is
Moreover, there should be one and only one build system (not a combinations).
Alternatives to cargo
From this list I only know gradle well enough to judge whether it can fulfill our requirements.
The text was updated successfully, but these errors were encountered: