load("//bazel:defs.bzl", "gzip_compress") load("//bazel:canisters.bzl", "optimized_canister") load("//bazel:transitions.bzl", "opt_stripped_binary") load("@buildifier_prebuilt//:rules.bzl", "buildifier") load("//bazel:buildifier.bzl", "buildifier_test") package(default_visibility = ["//visibility:public"]) exports_files([ ".rclone.conf", "clippy.toml", "rustfmt.toml", ]) BUILDIFIER_EXCLUDES = [ "./.git/*", "./gitlab-ci/src/git_changes/test_data/**", ] buildifier( name = "buildifier", exclude_patterns = BUILDIFIER_EXCLUDES, lint_mode = "fix", mode = "fix", ) # buildifier.check rule is used by buildifier_test buildifier( name = "buildifier.check", exclude_patterns = BUILDIFIER_EXCLUDES, lint_mode = "warn", mode = "diff", ) buildifier_test( name = "buildifier_test", tags = [ "external", "local", "no-sandbox", "small", "smoke", ], ) test_suite( name = "precommit", tests = [ ":buildifier_test", ], ) alias( name = "bazelifier", actual = "//rs/bazelifier", ) alias( name = "rustfmt", actual = "@rules_rust//:rustfmt", ) opt_stripped_binary( name = "replica", binary = "//rs/replica", ) opt_stripped_binary( name = "ic-btc-adapter", binary = "//rs/bitcoin/adapter:ic-btc-adapter", ) opt_stripped_binary( name = "ic-consensus-pool-util", binary = "//rs/artifact_pool:ic-consensus-pool-util", ) opt_stripped_binary( name = "sandbox_launcher", binary = "//rs/canister_sandbox/sandbox_launcher", ) opt_stripped_binary( name = "canister_sandbox", binary = "//rs/canister_sandbox", ) opt_stripped_binary( name = "ic-canister-http-adapter", binary = "//rs/canister_http/adapter:ic-canister-http-adapter", ) opt_stripped_binary( name = "orchestrator", binary = "//rs/orchestrator", ) opt_stripped_binary( name = "vsock_agent", binary = "//rs/guestos_vsock_agent", ) opt_stripped_binary( name = "ic-regedit", binary = "//rs/registry/regedit:ic-regedit", ) opt_stripped_binary( name = "ic-crypto-csp", binary = "//rs/crypto:ic-crypto-csp", ) opt_stripped_binary( name = "state-tool", binary = "//rs/state_tool", ) opt_stripped_binary( name = "ic-recovery", binary = "//rs/recovery:ic-recovery", ) optimized_canister( name = "ledger_archive_canister", wasm = "//rs/rosetta-api/ledger_canister:ledger-archive-node-canister-wasm", ) CANISTERS = { "cycles-minting-canister": "//rs/nns/cmc:cycles-minting-canister", "genesis-token-canister": "//rs/nns/gtc:genesis-token-canister", "governance-canister": "//rs/nns/governance:governance-canister", "ledger-canister": "//rs/rosetta-api/icrc1/ledger:ledger_canister", "nns-ui-canister": "//rs/nns/nns-ui:nns-ui-canister", "registry-canister": "//rs/registry/canister:registry-canister", "root-canister": "//rs/nns/handlers/root:root-canister", "sns-governance-canister": "//rs/sns/governance:sns-governance-canister", "sns-root-canister": "//rs/sns/root:sns-root-canister", "sns-swap-canister": "//rs/sns/swap:sns-swap-canister", "xnet-test-canister": "//rs/rust_canisters/xnet_test:xnet-test-canister", } [[ optimized_canister( name = name, wasm = CANISTERS[name], ), gzip_compress( name = name + ".wasm.gz", srcs = [":" + name + ".wasm"], ), ] for name in CANISTERS]