Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/butterflynet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
env:
# To minimize compile times: https://nnethercote.github.io/perf-book/build-configuration.html#minimizing-compile-times
RUSTFLAGS: "-C linker=clang -C link-arg=-fuse-ld=lld"
run: make install-slim-quick
run: make install-minimum-quick
- name: Run butterflynet checks
run: ./scripts/tests/butterflynet_check.sh
timeout-minutes: ${{ fromJSON(env.SCRIPT_TIMEOUT_MINUTES) }}
2 changes: 1 addition & 1 deletion .github/workflows/forest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ jobs:
env:
# To minimize compile times: https://nnethercote.github.io/perf-book/build-configuration.html#minimizing-compile-times
RUSTFLAGS: "-C linker=clang -C link-arg=-fuse-ld=lld"
run: make install-slim-quick
run: make install-minimum-quick
- uses: actions/upload-artifact@v6
with:
name: "forest-${{ runner.os }}"
Expand Down
7 changes: 0 additions & 7 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -282,11 +282,6 @@ debug = "full"
# This works on Linux. On other platforms, refer to https://doc.rust-lang.org/rustc/codegen-options/index.html#split-debuginfo
split-debuginfo = "off"

[profile.quick]
inherits = "release"
opt-level = 1
lto = "off"

[profile.profiling]
inherits = "dev"
opt-level = 0
Expand All @@ -308,13 +303,11 @@ lto = "fat"
# These should be refactored (probably removed) in #2984
[features]
default = ["jemalloc", "tokio-console", "tracing-loki", "tracing-chrome"]
slim = ["rustalloc"]
doctest-private = [] # see lib.rs::doctest_private
benchmark-private = ["dep:criterion"] # see lib.rs::benchmark_private
interop-tests-private = [] # see lib.rs::interop_tests_private

# Allocator. Use at most one of these.
rustalloc = []
jemalloc = ["dep:tikv-jemallocator"]
system-alloc = [] # Use the platform allocator (for memory profiling).

Expand Down
20 changes: 5 additions & 15 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,27 +1,18 @@
install:
cargo install --locked --path . --force

install-quick:
cargo install --profile quick --locked --path . --force

install-slim:
cargo install --no-default-features --features slim --locked --path . --force

install-slim-quick:
cargo install --profile quick --no-default-features --features slim --locked --path . --force

install-minimum:
cargo install --no-default-features --locked --path . --force

install-minimum-quick:
cargo install --debug --no-default-features --locked --path . --force

install-lto-fat:
cargo install --locked --force --profile release-lto-fat --path .

install-minimum-quick:
cargo install --profile quick --no-default-features --locked --path . --force

# Installs Forest binaries with default rust global allocator
install-with-rustalloc:
cargo install --locked --path . --force --no-default-features --features rustalloc
cargo install --locked --path . --force --no-default-features

install-lint-tools:
cargo install --locked taplo-cli
Expand Down Expand Up @@ -67,7 +58,6 @@ lint: license clean lint-clippy
# --quiet: don't show build logs
lint-clippy:
cargo clippy --all-targets --quiet --no-deps -- --deny=warnings
cargo clippy --all-targets --no-default-features --features slim --quiet --no-deps -- --deny=warnings
cargo clippy --all-targets --no-default-features --quiet --no-deps -- --deny=warnings
cargo clippy --benches --features benchmark-private --quiet --no-deps -- --deny=warnings
# check docs.rs build
Expand Down Expand Up @@ -107,7 +97,7 @@ test-docs:
cargo test --doc --features doctest-private

test-release:
cargo nextest run --cargo-profile quick --workspace --no-fail-fast
cargo nextest run --release --workspace --no-fail-fast

test-release-docs:
# nextest doesn't run doctests https://github.com/nextest-rs/nextest/issues/16
Expand Down
1 change: 0 additions & 1 deletion interop-tests/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ anyhow = { workspace = true }
cid = { workspace = true }
flume = { workspace = true }
forest = { package = "forest-filecoin", path = "../", default-features = false, features = [
"rustalloc",
"interop-tests-private",
"no-f3-sidecar",
] }
Expand Down
3 changes: 1 addition & 2 deletions src/cli_shared/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ use crate::utils::io::read_toml;
use std::path::PathBuf;

cfg_if::cfg_if! {
if #[cfg(feature = "rustalloc")] {
} else if #[cfg(feature = "jemalloc")] {
if #[cfg(feature = "jemalloc")] {
pub use tikv_jemallocator;
}
}
Expand Down
3 changes: 1 addition & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@
)]

cfg_if::cfg_if! {
if #[cfg(feature = "rustalloc")] {
} else if #[cfg(feature = "jemalloc")] {
if #[cfg(feature = "jemalloc")] {
use crate::cli_shared::tikv_jemallocator::Jemalloc;
#[global_allocator]
static GLOBAL: Jemalloc = Jemalloc;
Expand Down
Loading