| # Copyright 2026 The Fuchsia Authors. All rights reserved. | |
| # Use of this source code is governed by a BSD-style license that can be | |
| # found in the LICENSE file. | |
| load( | |
| "//build/bazel/rules/rust:defs.bzl", | |
| "rustc_library", | |
| "rustc_proc_macro", | |
| ) | |
| package(default_applicable_licenses = ["//:license"]) | |
| rustc_library( | |
| name = "from-enum", | |
| srcs = [ | |
| "src/lib.rs", | |
| ], | |
| crate_name = "from_enum", | |
| edition = "2024", | |
| proc_macro_deps = [":from-enum-derive"], | |
| visibility = ["//:__subpackages__"], | |
| ) | |
| rustc_proc_macro( | |
| name = "from-enum-derive", | |
| srcs = ["src/macro.rs"], | |
| crate_root = "src/macro.rs", | |
| edition = "2024", | |
| deps = [ | |
| "//third_party/rust_crates/vendor:darling", | |
| "//third_party/rust_crates/vendor:proc-macro2", | |
| "//third_party/rust_crates/vendor:quote", | |
| "//third_party/rust_crates/vendor:syn", | |
| ], | |
| ) |