Skip to content
Draft
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: 2 additions & 0 deletions BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ alias(

exports_files([
"AGENTS.md",
"test_binary_test_launcher.bat.tpl",
"test_binary_test_launcher.sh.tpl",
"workspace_root_test_launcher.bat.tpl",
"workspace_root_test_launcher.sh.tpl",
])
29 changes: 22 additions & 7 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -94,25 +94,40 @@ single_version_override(
)

rules_rust = use_extension("@rules_rs//rs/experimental:rules_rust.bzl", "rules_rust")
# Build-script probe binaries inherit CFLAGS/CXXFLAGS from Bazel's C++
# toolchain. On `windows-gnullvm`, llvm-mingw does not ship
# `libssp_nonshared`, so strip the forwarded stack-protector flags there.
rules_rust.patch(

bazel_dep(name = "rules_rust", version = "0.69.0")

# `rules_rs` 0.0.43 pins an older hermeticbuild/rules_rust commit. Override the
# extension-created repo so Codex can use rust_test sharding from #14 without
# updating the entire rules_rs module.
#
# Build-script probe binaries inherit CFLAGS/CXXFLAGS from Bazel's C++ toolchain.
# On `windows-gnullvm`, llvm-mingw does not ship `libssp_nonshared`, so strip the
# forwarded stack-protector flags there.
archive_override(
module_name = "rules_rust",
integrity = "sha256-q37yA5WS3++LIgdkThIhxsQkoZ5F/+DD4GhTWkY1rkE=",
patch_strip = 1,
patches = [
"//patches:rules_rust_windows_gnullvm_build_script.patch",
"//patches:rules_rust_windows_exec_msvc_build_script_env.patch",
"//patches:rules_rust_windows_bootstrap_process_wrapper_linker.patch",
"//patches:rules_rust_windows_build_script_runner_paths.patch",
"//patches:rules_rust_windows_msvc_direct_link_args.patch",
"//patches:rules_rust_windows_process_wrapper_skip_temp_outputs.patch",
"//patches:rules_rust_stable_explicit_test_shards.patch",
"//patches:rules_rust_windows_exec_bin_target.patch",
"//patches:rules_rust_windows_exec_std.patch",
"//patches:rules_rust_windows_exec_rustc_dev_rlib.patch",
"//patches:rules_rust_repository_set_exec_constraints.patch",
],
strip = 1,
strip_prefix = "rules_rust-10825e1a40b8f6d979c51bc795c9d3fa7f78cc6f",
urls = ["https://github.com/hermeticbuild/rules_rust/archive/10825e1a40b8f6d979c51bc795c9d3fa7f78cc6f.tar.gz"],
)

override_repo(
rules_rust,
rules_rust = "rules_rust",
)
use_repo(rules_rust, "rules_rust")

nightly_rust = use_extension(
"@rules_rs//rs/experimental:rules_rust_reexported_extensions.bzl",
Expand Down
100 changes: 100 additions & 0 deletions MODULE.bazel.lock

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

4 changes: 4 additions & 0 deletions codex-rs/app-server/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,9 @@ codex_rust_crate(
name = "app-server",
crate_name = "codex_app_server",
integration_test_timeout = "long",
test_shard_counts = {
"app-server-all-test": 8,
"app-server-unit-tests": 8,
},
test_tags = ["no-sandbox"],
)
4 changes: 4 additions & 0 deletions codex-rs/core/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ codex_rust_crate(
# succeeds without this workaround.
"//:AGENTS.md",
],
test_shard_counts = {
"core-all-test": 8,
"core-unit-tests": 8,
},
test_tags = ["no-sandbox"],
unit_test_timeout = "long",
extra_binaries = [
Expand Down
3 changes: 3 additions & 0 deletions codex-rs/tui/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ codex_rust_crate(
"src/**/*.rs",
"src/**/snapshots/**",
]) + ["//codex-rs/core:model_availability_nux_fixtures"],
test_shard_counts = {
"tui-unit-tests": 8,
},
integration_compile_data_extra = ["src/test_backend.rs"],
extra_binaries = [
"//codex-rs/cli:codex",
Expand Down
Loading
Loading