Skip to content

Commit 223be81

Browse files
committed
feat: Add max-pure build option to build without C dependencies (GitoxideLabs#592)
As opposed to the `small` option, it comes with all the features but avoids anything written in C (as far as we know), which should make building easier as it should only invoke the Rust compiler.
1 parent 04ee38c commit 223be81

File tree

4 files changed

+11
-5
lines changed

4 files changed

+11
-5
lines changed

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ jobs:
7777
matrix:
7878
# build: [ linux, linux-arm, macos, win-msvc, win-gnu, win32-msvc ]
7979
build: [ linux, macos, win-msvc, win-gnu, win32-msvc ]
80-
feature: [ "small", "lean", "max" ]
80+
feature: [ "small", "lean", "max", "max-pure" ]
8181
include:
8282
- build: linux
8383
os: ubuntu-18.04

Cargo.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,13 @@ lean = ["fast", "pretty-cli", "http-client-curl", "gitoxide-core-tools", "gitoxi
5252
## It uses, however, a fully asynchronous networking implementation which can serve a real-world example on how to implement custom async transports.
5353
lean-async = ["fast", "pretty-cli", "gitoxide-core-tools", "gitoxide-core-async-client", "prodash-render-line"]
5454

55-
## As small as it can possibly be, no threading, no fast sha1, log based progress only, rust based zlib implementation.
55+
## As small as it can possibly be, no threading, no fast sha1, line progress only, rust based zlib implementation.
5656
## no networking, local operations only.
5757
small = ["pretty-cli", "git-features/rustsha1", "git-features/zlib-rust-backend", "prodash-render-line", "atty" ]
5858

59+
## Makes the crate execute as fast as possible without pulling in C libraries, while keeping everything else minimal akin to the `small` build.
60+
max-pure = ["pretty-cli", "git-features/rustsha1", "git-features/zlib-rust-backend", "prodash-render-line", "prodash-render-tui", "git-repository/max-performance-safe", "http-client-curl", "gitoxide-core-blocking-client", "gitoxide-core-tools", "prodash/render-line-autoconfigure" ]
61+
5962
#! ### `gitoxide-core` Configuration
6063

6164
## A way to enable all `gitoxide-core` tools found in `gix tools`

Makefile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ doc: ## Run cargo doc on all crates
5151
clippy: ## Run cargo clippy on all crates
5252
cargo clippy --all --tests --examples
5353
cargo clippy --all --no-default-features --features small
54+
cargo clippy --all --no-default-features --features max-pure
5455
cargo clippy --all --no-default-features --features lean-async --tests
5556

5657
check-msrv: ## run cargo msrv to validate the current msrv requirements, similar to what CI does
@@ -171,12 +172,14 @@ continuous-unit-tests: ## run all unit tests whenever something changes
171172
watchexec -w src $(MAKE) unit-tests
172173

173174
jtt = target/debug/jtt
174-
journey-tests: always ## run journey tests (max)
175+
journey-tests: always ## run journey tests (max + pure)
175176
cargo build
176177
cargo build --package git-testtools --bin jtt
177178
./tests/journey.sh target/debug/ein target/debug/gix $(jtt) max
179+
cargo build --no-default-features --features max-pure
180+
./tests/journey.sh target/debug/ein target/debug/gix $(jtt) max
178181

179-
journey-tests-small: always ## run journey tests (lean-cli)
182+
journey-tests-small: always ## run journey tests (small)
180183
cargo build --no-default-features --features small
181184
cd tests/tools && cargo build
182185
./tests/journey.sh target/debug/ein target/debug/gix $(jtt) small

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ cargo install --git https://github.com/Byron/gitoxide gitoxide
220220
#### How to deal with build failures
221221

222222
On some platforms, installation may fail due to lack of tools required by `C` toolchains. This can generally be avoided by installation
223-
with `cargo install gitoxide --no-default-features --features small`.
223+
with `cargo install gitoxide --no-default-features --features max-pure`.
224224

225225
What follows is a list of known failures.
226226

0 commit comments

Comments
 (0)