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
6 changes: 2 additions & 4 deletions tools/buck/toolchains/BUCK
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
load(":rust.bzl", "rust_toolchain")
load("@prelude//tests:test_toolchain.bzl", "noop_test_toolchain")
load("@prelude//toolchains:cxx.bzl", "system_cxx_toolchain")
load("@prelude//toolchains:genrule.bzl", "system_genrule_toolchain")
load("@prelude//toolchains:python.bzl", "system_python_bootstrap_toolchain")
load("@prelude//toolchains:remote_test_execution.bzl", "remote_test_execution_toolchain")
load("@prelude//toolchains:rust.bzl", "system_rust_toolchain")

system_cxx_toolchain(
name = "cxx",
Expand All @@ -30,10 +30,8 @@ system_python_bootstrap_toolchain(
visibility = ["PUBLIC"],
)

system_rust_toolchain(
rust_toolchain(
name = "rust",
default_edition = None,
doctests = True,
visibility = ["PUBLIC"],
)

Expand Down
19 changes: 19 additions & 0 deletions tools/buck/toolchains/rust.bzl
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
load("@prelude//rust:rust_toolchain.bzl", "PanicRuntime", "RustToolchainInfo")

def _rust_toolchain_impl(ctx):
return [
DefaultInfo(),
RustToolchainInfo(
advanced_unstable_linking = True,
clippy_driver = RunInfo(args = ["clippy-driver"]),
compiler = RunInfo(args = ["rustc"]),
panic_runtime = PanicRuntime("unwind"),
rustdoc = RunInfo(args = ["rustdoc"]),
),
]

rust_toolchain = rule(
impl = _rust_toolchain_impl,
attrs = {},
is_toolchain_rule = True,
)
Loading