Skip to content
Open
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
9 changes: 2 additions & 7 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -102,25 +102,20 @@ build --@rules_rust//:clippy_flag=-Wclippy::nursery
build --@rules_rust//:clippy_flag=-Wclippy::pedantic
build --@rules_rust//:clippy_flag=-Dclippy::alloc_instead_of_core
build --@rules_rust//:clippy_flag=-Dclippy::as_underscore
build --@rules_rust//:clippy_flag=-Dclippy::await_holding_lock
build --@rules_rust//:clippy_flag=-Wclippy::dbg_macro
build --@rules_rust//:clippy_flag=-Wclippy::decimal_literal_representation
build --@rules_rust//:clippy_flag=-Dclippy::elidable_lifetime_names
build --@rules_rust//:clippy_flag=-Dclippy::explicit_into_iter_loop
build --@rules_rust//:clippy_flag=-Aclippy::get_unwrap
build --@rules_rust//:clippy_flag=-Dclippy::missing_const_for_fn
build --@rules_rust//:clippy_flag=-Aclippy::missing_docs_in_private_items
build --@rules_rust//:clippy_flag=-Wclippy::print_stdout
build --@rules_rust//:clippy_flag=-Dclippy::redundant_closure_for_method_calls
build --@rules_rust//:clippy_flag=-Dclippy::semicolon_if_nothing_returned
build --@rules_rust//:clippy_flag=-Dclippy::std_instead_of_core
build --@rules_rust//:clippy_flag=-Dclippy::todo
build --@rules_rust//:clippy_flag=-Wclippy::todo
build --@rules_rust//:clippy_flag=-Aclippy::too_long_first_doc_paragraph
build --@rules_rust//:clippy_flag=-Wclippy::unimplemented
build --@rules_rust//:clippy_flag=-Aclippy::unwrap_in_result
build --@rules_rust//:clippy_flag=-Aclippy::unwrap_used
build --@rules_rust//:clippy_flag=-Wclippy::use_debug
build --@rules_rust//:clippy_flag=-Dclippy::cast_possible_truncation
build --@rules_rust//:clippy_flag=-Aclippy::cast_possible_truncation
build --@rules_rust//:clippy_flag=-Aclippy::cast_possible_wrap
build --@rules_rust//:clippy_flag=-Aclippy::cast_precision_loss
build --@rules_rust//:clippy_flag=-Aclippy::cast_sign_loss
Expand Down
19 changes: 13 additions & 6 deletions .github/workflows/sanitizers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,19 @@ jobs:
actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683

- name: Free disk space
uses: >- # v2.0.0
endersonmenezes/free-disk-space@3f9ec39ebae520864ac93467ee395f5237585c21
with:
remove_android: false # Takes too long.
remove_dotnet: true
remove_haskell: true
run: |
echo "Before cleanup:"
df -h /

# Remove dotnet
sudo rm -rf /usr/share/dotnet

# Remove Haskell
sudo rm -rf /opt/ghc
sudo rm -rf /usr/local/.ghcup

echo "After cleanup:"
df -h /

- name: Setup Bazel
uses: >- # v0.13.0
Expand Down
242 changes: 83 additions & 159 deletions CHANGELOG.md

Large diffs are not rendered by default.

15 changes: 6 additions & 9 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 7 additions & 21 deletions Cargo.toml
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This and various other config files appear to have been reset to ~0.7.1 era (given the versions) and they remove a bunch of fixes I've done in that time. Possibly merge issues?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that's correct. Let me try to get this fixed.

Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#:schema tools/cargo-with-detailed-deps.json
[workspace]
exclude = [
"nativelink-config/generate-stores-config",
Expand All @@ -10,7 +9,7 @@ resolver = "2"
edition = "2024"
name = "nativelink"
rust-version = "1.87.0"
version = "0.7.5"
version = "0.7.1"

[profile.release]
lto = true
Expand Down Expand Up @@ -48,19 +47,11 @@ nativelink-worker = { path = "nativelink-worker" }

async-lock = { version = "3.4.0", features = ["std"], default-features = false }
axum = { version = "0.8.3", default-features = false }
clap = { version = "4.5.35", features = [
"color",
"derive",
"error-context",
"help",
"std",
"suggestions",
"usage",
], default-features = false }
clap = { version = "4.5.35", features = ["derive"] }
futures = { version = "0.3.31", default-features = false }
hyper = { version = "1.6.0", default-features = false }
hyper-util = { version = "0.1.11", default-features = false }
mimalloc = { version = "0.1.44", default-features = false }
hyper = "1.6.0"
hyper-util = "0.1.11"
mimalloc = "0.1.44"
rustls-pemfile = { version = "2.2.0", features = [
"std",
], default-features = false }
Expand Down Expand Up @@ -148,20 +139,15 @@ pedantic = { level = "warn", priority = -1 }
# Restriction Denies with default priority
alloc-instead-of-core = "deny"
as-underscore = "deny"
await-holding-lock = "deny"
elidable-lifetime-names = "deny"
explicit-into-iter-loop = "deny"
redundant-closure-for-method-calls = "deny"
semicolon-if-nothing-returned = "deny"
std-instead-of-core = "deny"
todo = "deny"

# Restriction Warnings with default priority
dbg-macro = "warn"
decimal-literal-representation = "warn"
get-unwrap = "allow" # TODO(jhpratt) Flip
missing-docs-in-private-items = "allow" # TODO(jhpratt) Flip
print-stdout = "warn"
todo = "warn"
unimplemented = "warn"
unwrap-in-result = "allow" # TODO(jhpratt) Flip
unwrap-used = "allow" # TODO(jhpratt) Flip
Expand All @@ -180,7 +166,7 @@ too-long-first-doc-paragraph = { level = "allow" } # TODO(jhpratt)
uninhabited-references = { level = "allow", priority = 1 } # rust-lang/rust-clippy#11984

# TODO(palfrey): Remove these to get to pedantic.
cast_possible_truncation = { level = "deny", priority = 1 }
cast_possible_truncation = { level = "allow", priority = 1 }
cast_possible_wrap = { level = "allow", priority = 1 }
cast_precision_loss = { level = "allow", priority = 1 }
cast_sign_loss = { level = "allow", priority = 1 }
Expand Down
2 changes: 1 addition & 1 deletion MODULE.bazel
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module(
name = "nativelink",
version = "0.7.5",
version = "0.7.1",
compatibility_level = 0,
)

Expand Down
118 changes: 118 additions & 0 deletions deployment-examples/persistent-workers/.bazelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
# Copyright 2025 The NativeLink Authors. All rights reserved.
#
# Licensed under the Functional Source License, Version 1.1, Apache 2.0 Future License (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# See LICENSE file for details
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# Bazel configuration for using NativeLink with Remote Persistent Workers
# This configuration is optimized for JVM-based projects (Java, Scala, Kotlin)
# and large TypeScript/JavaScript projects

# Remote execution configuration
build --remote_executor=grpc://localhost:50051
build --remote_cache=grpc://localhost:50051

# Enable remote persistent workers
build --experimental_remote_mark_tool_inputs
build --experimental_remote_persistent_workers

# Instance name for the remote execution service
build --remote_instance_name=main

# Default remote execution properties
build --remote_default_exec_properties=OSFamily=linux
build --remote_default_exec_properties=cpu_count=4

# Java/Scala persistent worker configuration
build:java --strategy=Javac=remote
build:java --strategy=JavaIjar=remote
build:java --strategy=JavaDeployJar=remote
build:java --strategy=JavaSourceJar=remote
build:java --remote_default_exec_properties=persistentWorkerTool=javac
build:java --worker_extra_flag=Javac=--persistent_worker
build:java --worker_max_instances=Javac=5
build:java --worker_quit_after_build=false

# Scala persistent worker configuration
build:scala --strategy=Scalac=remote
build:scala --remote_default_exec_properties=persistentWorkerTool=scalac
build:scala --worker_extra_flag=Scalac=--persistent_worker
build:scala --worker_max_instances=Scalac=3
build:scala --worker_quit_after_build=false

# Kotlin persistent worker configuration
build:kotlin --strategy=KotlinCompile=remote
build:kotlin --remote_default_exec_properties=persistentWorkerTool=kotlinc
build:kotlin --worker_extra_flag=KotlinCompile=--persistent_worker
build:kotlin --worker_max_instances=KotlinCompile=3
build:kotlin --worker_quit_after_build=false

# TypeScript persistent worker configuration
build:typescript --strategy=TypeScriptCompile=remote
build:typescript --remote_default_exec_properties=persistentWorkerTool=tsc
build:typescript --worker_extra_flag=TypeScriptCompile=--persistent_worker
build:typescript --worker_max_instances=TypeScriptCompile=5
build:typescript --worker_quit_after_build=false

# Webpack bundling with persistent workers
build:webpack --strategy=WebpackBundle=remote
build:webpack --remote_default_exec_properties=persistentWorkerTool=webpack
build:webpack --worker_extra_flag=WebpackBundle=--persistent_worker
build:webpack --worker_max_instances=WebpackBundle=2
build:webpack --worker_quit_after_build=false

# General persistent worker settings
build --worker_verbose
build --worker_sandboxing=false # Persistent workers don't support sandboxing
build --worker_multiplex_sandboxing=false
build --experimental_worker_strict_flagfiles
build --experimental_worker_for_repo_fetching=off

# Memory management for JVM workers
build --worker_extra_flag=Javac=-J-Xmx2g
build --worker_extra_flag=Scalac=-J-Xmx4g
build --worker_extra_flag=KotlinCompile=-J-Xmx2g

# Performance optimizations
build --jobs=100
build --remote_download_minimal
build --experimental_remote_cache_compression
build --experimental_remote_cache_async
build --remote_timeout=3600

# Debugging persistent workers (uncomment when needed)
# build --worker_verbose
# build --sandbox_debug
# build --verbose_failures
# build --subcommands=pretty_print

# Platform-specific configurations
build:linux --remote_default_exec_properties=OSFamily=linux
build:linux --remote_default_exec_properties=container-image=docker://gcr.io/nativelink/ubuntu-22.04-java17

build:macos --remote_default_exec_properties=OSFamily=darwin
build:macos --remote_default_exec_properties=arch=x86_64

build:windows --remote_default_exec_properties=OSFamily=windows
build:windows --remote_default_exec_properties=arch=x64

# CI configuration with persistent workers
build:ci --config=java
build:ci --config=remote
build:ci --remote_upload_local_results=true
build:ci --remote_timeout=3600
build:ci --worker_quit_after_build=true # Clean up workers after CI build

# Development configuration
build:dev --config=java
build:dev --worker_quit_after_build=false
build:dev --worker_max_instances=10
build:dev --remote_download_outputs=toplevel
Loading
Loading