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

Replace shell scripts by xtask #2887

Closed
YgorSouza opened this issue Apr 8, 2023 · 1 comment · Fixed by #4293
Closed

Replace shell scripts by xtask #2887

YgorSouza opened this issue Apr 8, 2023 · 1 comment · Fixed by #4293

Comments

@YgorSouza
Copy link
Contributor

xtasks are effectively like shell scripts written in Rust. As they only require rustc and cargo, they solve most portability problems (see for example #2859). They also allow using any Rust crates as part of the build automation, so for example they could pull the wasm-opt crate as a dependency, instead of having this comment instructing the user to install it manually:

# to get wasm-opt: apt/brew/dnf install binaryen
wasm-opt "docs/${CRATE_NAME}_bg.wasm" -O2 --fast-math -o "docs/${CRATE_NAME}_bg.wasm" # add -g to get debug symbols

So it could make the repository easier to work with for new contributors.

@emilk
Copy link
Owner

emilk commented May 22, 2023

It would be nice, but there are a few concerns I have:

A) I don't want wasm-opt to be compiled in if a user calls cargo check or cargo run
B) Verbosity: rust code can become quite verbose compared to a shell script
C) Compile times: It's annoying when a simple script takes a minute to compile

All of these are probably solvable, but I wanted to flag them ahead of time

YgorSouza added a commit to YgorSouza/egui that referenced this issue Mar 31, 2024
Replaces only the cargo_deny.sh script for now. Can be expanded over to
replace the other shell and python scripts, so only Rust is needed to
work with the repository.

Closes emilk#2887
YgorSouza added a commit to YgorSouza/egui that referenced this issue Apr 17, 2024
Replaces only the cargo_deny.sh script for now. Can be expanded over to
replace the other shell and python scripts, so only Rust is needed to
work with the repository.

Closes emilk#2887
YgorSouza added a commit to YgorSouza/egui that referenced this issue Apr 21, 2024
Replaces only the cargo_deny.sh script for now. Can be expanded over to
replace the other shell and python scripts, so only Rust is needed to
work with the repository.

Closes emilk#2887
emilk added a commit that referenced this issue Apr 21, 2024
Replaces only the cargo_deny.sh script for now. Can be expanded over
time to replace the other shell and python scripts, so only Rust is
needed to work with the repository.

Closes <#2887>
Closes <#4373>

---------

Co-authored-by: Emil Ernerfeldt <[email protected]>
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 a pull request may close this issue.

2 participants