load("//:defs.bzl", "codex_rust_crate")

codex_rust_crate(
    name = "core",
    crate_name = "codex_core",
    # TODO(mbolin): Eliminate the use of features in the version of the
    # rust_library() that is used by rust_binary() rules for release artifacts
    # such as the Codex CLI.
    crate_features = ["deterministic_process_ids", "test-support"],
    compile_data = glob(
        include = ["**"],
        exclude = [
            "**/* *",
            "BUILD.bazel",
            "Cargo.toml",
        ],
        allow_empty = True,
    ),
    integration_compile_data_extra = [
        "//codex-rs/apply-patch:apply_patch_tool_instructions.md",
        "prompt.md",
    ],
    integration_deps_extra = ["//codex-rs/core/tests/common:common"],
    test_tags = ["no-sandbox"],
    extra_binaries = [
        "//codex-rs/linux-sandbox:codex-linux-sandbox",
        "//codex-rs/rmcp-client:test_stdio_server",
        "//codex-rs/rmcp-client:test_streamable_http_server",
        "//codex-rs/cli:codex",
    ],
)
