| # Copyright 2026 The Fuchsia Authors |
| # |
| # Use of this source code is governed by a MIT-style |
| # license that can be found in the LICENSE file or at |
| # https://opensource.org/licenses/MIT |
| |
| import("//build/components.gni") |
| import("//build/rust/rustc_library.gni") |
| |
| rustc_library("kalloc") { |
| edition = "2024" |
| sources = [ |
| "src/allocator.rs", |
| "src/boxed.rs", |
| "src/lib.rs", |
| ] |
| with_unit_tests = true |
| |
| if (is_kernel) { |
| rustflags = [ "--cfg=is_kernel" ] |
| } |
| } |
| |
| fuchsia_unittest_package("kalloc-rust-test-pkg") { |
| package_name = "kalloc-rust-test" |
| deps = [ ":kalloc_test" ] |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ ":kalloc-rust-test-pkg" ] |
| } |