load("@rules_rust//rust:defs.bzl", "rust_library") # buildifier: disable=bzl-visibility load( "@rules_rust//rust/private:rust.bzl", "rust_library_without_process_wrapper", ) package( default_visibility = ["@rules_rust//ffi/rs:__subpackages__"], ) srcs = select({ # Windows doesn't support weak symbol linkage. # If someone can make this work on Windows, please do! # For now we will silently not supply any symbols, because it would be very messy to conditionally define the default allocator library on toolchains depending on the platform. "@platforms//os:windows": ["empty.rs"], "//conditions:default": ["allocator_library.rs"], }) rust_library( name = "allocator_library", srcs = srcs, allocator_libraries = "@rules_rust//ffi/rs:empty_allocator_libraries", edition = "2024", tags = ["manual"], ) rust_library_without_process_wrapper( name = "allocator_library_without_process_wrapper", srcs = srcs, allocator_libraries = "@rules_rust//ffi/rs:empty_allocator_libraries", edition = "2024", tags = ["manual"], )