BUILD.bazel 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. # Code generated by cargo-gazelle DO NOT EDIT
  2. # Copyright Materialize, Inc. and contributors. All rights reserved.
  3. #
  4. # Use of this software is governed by the Business Source License
  5. # included in the LICENSE file at the root of this repository.
  6. #
  7. # As of the Change Date specified in that file, in accordance with
  8. # the Business Source License, use of this software will be governed
  9. # by the Apache License, Version 2.0.
  10. load("@crates_io//:defs.bzl", "aliases", "all_crate_deps")
  11. load("@rules_rust//cargo:defs.bzl", "extract_cargo_lints")
  12. load("@rules_rust//rust:defs.bzl", "rust_binary", "rust_doc_test", "rust_library", "rust_test")
  13. package(default_visibility = ["//visibility:public"])
  14. rust_library(
  15. name = "cargo_gazelle",
  16. srcs = glob(["src/**/*.rs"]),
  17. aliases = aliases(
  18. normal = True,
  19. proc_macro = True,
  20. ),
  21. compile_data = [],
  22. crate_features = ["default"],
  23. data = [],
  24. lint_config = ":lints",
  25. proc_macro_deps = [] + all_crate_deps(proc_macro = True),
  26. rustc_env = {},
  27. rustc_flags = [],
  28. version = "0.0.0",
  29. deps = [] + all_crate_deps(normal = True),
  30. )
  31. alias(
  32. name = "cargo-gazelle",
  33. actual = "cargo_gazelle",
  34. )
  35. rust_test(
  36. name = "cargo_gazelle_lib_tests",
  37. size = "medium",
  38. aliases = aliases(
  39. normal = True,
  40. normal_dev = True,
  41. proc_macro = True,
  42. proc_macro_dev = True,
  43. ),
  44. compile_data = [],
  45. crate = ":cargo_gazelle",
  46. crate_features = ["default"],
  47. data = [],
  48. env = {},
  49. lint_config = ":lints",
  50. proc_macro_deps = [] + all_crate_deps(
  51. proc_macro = True,
  52. proc_macro_dev = True,
  53. ),
  54. rustc_env = {},
  55. rustc_flags = [],
  56. version = "0.0.0",
  57. deps = [] + all_crate_deps(
  58. normal = True,
  59. normal_dev = True,
  60. ),
  61. )
  62. rust_doc_test(
  63. name = "cargo_gazelle_doc_test",
  64. crate = ":cargo_gazelle",
  65. deps = [] + all_crate_deps(
  66. normal = True,
  67. normal_dev = True,
  68. ),
  69. )
  70. rust_binary(
  71. name = "main",
  72. srcs = glob(["src/**/*.rs"]),
  73. aliases = aliases(
  74. normal = True,
  75. proc_macro = True,
  76. ),
  77. compile_data = [],
  78. crate_root = "src/bin/main.rs",
  79. data = [],
  80. env = {},
  81. features = [],
  82. lint_config = ":lints",
  83. proc_macro_deps = [] + all_crate_deps(proc_macro = True),
  84. rustc_env = {},
  85. rustc_flags = ["-Copt-level=3"] + select({
  86. "@//misc/bazel/platforms:xlang_lto_enabled": ["-Clinker-plugin-lto"],
  87. "//conditions:default": [],
  88. }),
  89. version = "0.0.0",
  90. deps = [":cargo_gazelle"] + all_crate_deps(normal = True),
  91. )
  92. extract_cargo_lints(
  93. name = "lints",
  94. manifest = "Cargo.toml",
  95. workspace = "@//:Cargo.toml",
  96. )