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
4 changes: 2 additions & 2 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ bazel_dep(name = "rules_foreign_cc", version = "0.15.0")
crate = use_extension("@rules_rust//crate_universe:extensions.bzl", "crate")
crate.from_cargo(
name = "crate_index",
lockfile = "//:Cargo.Bazel.lock",
cargo_lockfile = "//:Cargo.lock",
lockfile = "//:Cargo.Bazel.lock",
manifests = [
"//:Cargo.toml",
],
Expand All @@ -52,7 +52,7 @@ crubit_toolchains.configure(
llvm_version = "22.1.0",
rust_version = "nightly/2026-07-01",
)
use_repo(crubit_toolchains, "llvm_toolchain", "rust_toolchains", "llvm_version_check")
use_repo(crubit_toolchains, "llvm_toolchain", "llvm_version_check", "rust_toolchains")

register_toolchains(
"@rust_toolchains//:all",
Expand Down
1 change: 1 addition & 0 deletions cc_bindings_from_rs/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ crubit_rust_binary(
"not_run",
"notap",
],
visibility = ["//visibility:public"],
deps = [
":cmdline",
":cpp_api_from_rust_lib",
Expand Down
2 changes: 1 addition & 1 deletion cc_bindings_from_rs/cc_bindings_from_rs_sh_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ function delete_all_test_outputs() {
rm -rf "$STDERR_PATH" "$STDOUT_PATH" "$H_OUT_PATH" "$RS_OUT_PATH" "$TARGET_JSON_PATH"
}

readonly CC_BINDINGS_FROM_RS_PATH="${RUNFILES}/cc_bindings_from_rs/cc_bindings_from_rs"
readonly CC_BINDINGS_FROM_RS_PATH="${RUNFILES}/rules_crubit/cc_bindings_from_rs/cc_bindings_from_rs"
readonly SYSROOT_PATH="${RUNFILES}/${G3_SYSROOT_PATH}"
readonly DEFAULT_CLANG_FORMAT_EXE_PATH="${CRUBIT_CLANG_FORMAT_EXE_PATH}"

Expand Down
1 change: 1 addition & 0 deletions crubit_explorer/.bazelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import %workspace%/../.bazelrc
1 change: 1 addition & 0 deletions crubit_explorer/.bazelversion
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
9.2.0
59 changes: 41 additions & 18 deletions crubit_explorer/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,12 @@
# Exceptions. See /LICENSE for license information.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

load(
"@rules_crubit//common:crubit_wrapper_macros_oss.bzl",
"crubit_rust_binary",
"crubit_rust_test",
)
load("@rules_license//rules:license.bzl", "license")
load("@rules_rust//rust:defs.bzl", "rust_binary", "rust_test")

package(
default_applicable_licenses = [":license"],
Expand All @@ -15,35 +19,54 @@ license(
package_name = "crubit_explorer",
)

rust_binary(
crubit_rust_binary(
name = "server",
srcs = ["src/main.rs"],
data = [
"//frontend:build",
"@rules_crubit//cc_bindings_from_rs",
"@rules_rust//rust/toolchain:current_rustc_files",
"@rules_rust//rust/toolchain:current_rustc_lib_files",
],
edition = "2024",
env = {
"RUSTC_RUNFILES_PATH": "$(rlocationpath @rules_rust//rust/toolchain:current_rustc_files)",
},
visibility = ["//visibility:public"],
deps = [
"@crate_index//:axum", # v0_8
"@crate_index//:base64", # v0_22
"@crate_index//:serde", # v1
"@crate_index//:serde_json", # v1
"@crate_index//:tempfile", # v3
"@crate_index//:tokio", # v1
"@crate_index//:tower-http",
"@crubit_explorer_crates//:axum",
"@crubit_explorer_crates//:base64",
"@crubit_explorer_crates//:serde",
"@crubit_explorer_crates//:serde_json",
"@crubit_explorer_crates//:tempfile",
"@crubit_explorer_crates//:tokio",
"@rules_rust//tools/runfiles",
],
)

rust_test(
crubit_rust_test(
name = "server_test",
size = "small",
srcs = ["src/main.rs"],
data = [
"//frontend:build",
"@rules_crubit//cc_bindings_from_rs",
"@rules_rust//rust/toolchain:current_rustc_files",
"@rules_rust//rust/toolchain:current_rustc_lib_files",
],
edition = "2024",
env = {
"RUSTC_RUNFILES_PATH": "$(rlocationpath @rules_rust//rust/toolchain:current_rustc_files)",
},
deps = [
"@crate_index//:axum", # v0_8
"@crate_index//:base64", # v0_22
"@crate_index//:serde", # v1
"@crate_index//:serde_json", # v1
"@crate_index//:tempfile", # v3
"@crate_index//:tokio", # v1
"@crate_index//:tower", # v0_5
"@crate_index//:tower-http",
"@crubit_explorer_crates//:axum",
"@crubit_explorer_crates//:base64",
"@crubit_explorer_crates//:googletest",
"@crubit_explorer_crates//:serde",
"@crubit_explorer_crates//:serde_json",
"@crubit_explorer_crates//:tempfile",
"@crubit_explorer_crates//:tokio",
"@crubit_explorer_crates//:tower",
"@rules_rust//tools/runfiles",
],
)
Loading