• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright 2023 The Pigweed Authors
2#
3# Licensed under the Apache License, Version 2.0 (the "License"); you may not
4# use this file except in compliance with the License. You may obtain a copy of
5# the License at
6#
7#     https://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
11# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12# License for the specific language governing permissions and limitations under
13# the License.
14
15load("@rules_rust//rust:defs.bzl", "rust_doc_test", "rust_library", "rust_test")
16load("//pw_build:compatibility.bzl", "incompatible_with_mcu")
17
18package(default_visibility = ["//visibility:public"])
19
20rust_library(
21    name = "pw_base64",
22    srcs = [
23        "pw_base64/lib.rs",
24        "pw_base64/tests/mod.rs",
25        "pw_base64/tests/random_data.rs",
26        "pw_base64/tests/single_char.rs",
27    ],
28    crate_features = select({
29        "@rust_crates//:std": ["std"],
30        "//conditions:default": [""],
31    }),
32    deps = [
33        "//pw_status/rust:pw_status",
34        "//pw_stream/rust:pw_stream",
35    ],
36)
37
38rust_test(
39    name = "pw_base64_test",
40    crate = ":pw_base64",
41    crate_features = select({
42        "@rust_crates//:std": ["std"],
43        "//conditions:default": [""],
44    }),
45    # TODO: b/343726867 - support on-device rust tests
46    target_compatible_with = incompatible_with_mcu(),
47)
48
49rust_doc_test(
50    name = "pw_base64_doc_test",
51    crate = ":pw_base64",
52    target_compatible_with = incompatible_with_mcu(),
53)
54