This replaces an inline cargo install of https://github.com/a-scie/ptex with the ureq library. The ptex binary seems to only be used as a "portable" curl -O <url>, which can, I think, be done with code built into the package/ lib itself.
This change:
conceptually simplifies the "build scie-pants" process
makes it more reliable/secure (I think the cargo install wasn't using ptex's lockfile, because it didn't pass --locked)
potentially speeds up the build when not cached (building ptex has to build a whole lot of libraries, taking 30+s for me).
It also gets rid of two explicit dependencies (once_cell, url)... but ureq depends on both, so they don't actually disappear from the dependency tree. 🤷
I chose ureq because it doesn't seem to add much compilation time. With some benchmarks on my 4-core laptop:
build type
time before (s)
time after (s)
clean
9-10
10-11
cached, comment change in package/src/utils/build.rs
0.5-0.6
0.5-0.6
There's three commits, which can be reviewed individually. The middle one is the interesting one, with the other two minor related refactors.
This replaces an inline
cargo install
of https://github.com/a-scie/ptex with theureq
library. Theptex
binary seems to only be used as a "portable"curl -O <url>
, which can, I think, be done with code built into thepackage/
lib itself.This change:
cargo install
wasn't usingptex
's lockfile, because it didn't pass--locked
)It also gets rid of two explicit dependencies (
once_cell
,url
)... butureq
depends on both, so they don't actually disappear from the dependency tree. 🤷I chose
ureq
because it doesn't seem to add much compilation time. With some benchmarks on my 4-core laptop:package/src/utils/build.rs
There's three commits, which can be reviewed individually. The middle one is the interesting one, with the other two minor related refactors.