Skip to content
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

build: add Makefile for Rust noobs #1318

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

knocte
Copy link

@knocte knocte commented Sep 11, 2024

With this minimal wrappers, one could just download&install Rust and after that just type 'make', no need to be knowledgeable about how to build things in Rust ecosystem.

With this minimal wrappers, one could just download&install Rust
and after that just type 'make', no need to be knowledgeable about
how to build things in Rust ecosystem.
@darosior
Copy link
Member

So that's effectively simply an alias for cargo build? I don't think that's worth it. The annoying part is installing the Rust toolchain, once that's done typing cargo build in place of make makes no difference.

@knocte
Copy link
Author

knocte commented Sep 11, 2024

once that's done typing cargo build in place of make makes no difference.

For developing, it's much faster to type it. I could also add a Makefile target for doing a release build via make rel?

@knocte
Copy link
Author

knocte commented Sep 11, 2024

For developing, it's much faster to type it. I could also add a Makefile target for doing a release build via make rel?

Also, it is a convention to run the tests with make check, and from the CI file I can gather that the best flags for running them are kinda long to type.

@pythcoiner
Copy link
Collaborator

So that's effectively simply an alias for cargo build? I don't think that's worth it. The annoying part is installing the Rust toolchain, once that's done typing cargo build in place of make makes no difference.

agree, what is annoying for a noob is toolchain + linux dependencies

@knocte
Copy link
Author

knocte commented Sep 11, 2024

agree, what is annoying for a noob is toolchain + linux dependencies

To that end, I could contribute a configure.sh script that checks if all necessary Rust tools (and proper minimal versions) are installed, and if they are not, it would advise the user how to install them.

This way a user gets hinted about what to install (and
what version), and an example way to install it.
@knocte
Copy link
Author

knocte commented Sep 11, 2024

To that end, I could contribute a configure.sh script that checks if all necessary Rust tools (and proper minimal versions) are installed, and if they are not, it would advise the user how to install them.

I added a 2nd commit that adds this check inside the Makefile actually (and gives the user a hint of 2 examples of how to install Rust). I could improve this later so that it checks the specific version of Rust that is needed.

@RandyMcMillan
Copy link

I will submit ‘make help’ configuration PR

@RandyMcMillan
Copy link

#1352

@knocte
Copy link
Author

knocte commented Sep 19, 2024

I will submit ‘make help’ configuration PR

IMHO that PR doesn't follow the K.I.S.S. principle 😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants