Skip to content

[WIP] repo: Shift cargo-raze -> crate_universe #390

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .bazelversion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
5.2.0
6.5.0
17 changes: 7 additions & 10 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,29 +78,26 @@ jobs:
- name: Format (buildifier)
run: find . -name "WORKSPACE" -o -name "*BUILD*" -o -name "*.bzl" | xargs -n1 buildifier -mode=check

cargo_raze:
name: check format with cargo-raze
rules_rust:
name: check format with rules_rust

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Install dependencies
run: cargo install cargo-raze --version 0.14.1

- name: Format (bazel query)
run: |
bazel query 'deps(//bazel/cargo/...)'

- name: Format (cargo raze)
working-directory: bazel/cargo
run: |
cd wasmsign && cargo raze && cd ..
cd wasmtime && cargo raze && cd ..
# Ignore manual changes in "errno" and "rustix" crates until fixed in cargo-raze.
# See: https://github.com/google/cargo-raze/issues/451
git diff --exit-code -- ':!wasmtime/remote/BUILD.errno-0.*.bazel' ':!wasmtime/remote/BUILD.rustix-0.*.bazel'
cargo generate-lockfile
mv Cargo.lock bazel/cargo/Cargo.Bazel.lock
bazel run //bazel/cargo/wasmtime:crates_vendor
bazel run //bazel/cargo/wasmsign:crates_vendor
git diff --exit-code

clang_format:
name: check format with clang-format
Expand Down
61 changes: 28 additions & 33 deletions bazel/cargo/wasmsign/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,39 +1,34 @@
"""
@generated
cargo-raze generated Bazel file.
# Copyright 2022 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

DO NOT EDIT! Replaced on runs of cargo-raze
"""
load("@rules_rust//crate_universe:defs.bzl", "crates_vendor")
load("@proxy_wasm_cpp_host//bazel:dependencies.bzl", "SUPPORTED_PLATFORM_TRIPLES")

package(default_visibility = ["//visibility:public"])

licenses([
"notice", # See individual crates for specific licenses
])

# Aliased targets
alias(
name = "cargo_bin_wasmsign",
actual = "@wasmsign__wasmsign__0_1_2//:cargo_bin_wasmsign",
tags = [
"cargo-raze",
"manual",
],
)

alias(
name = "wasmsign",
actual = "@wasmsign__wasmsign__0_1_2//:wasmsign",
tags = [
"cargo-raze",
"manual",
],
)

# Export file for Stardoc support
exports_files(
[
"crates.bzl",
"Cargo.toml",
"Cargo.Bazel.lock",
],
visibility = ["//visibility:public"],
)

crates_vendor(
name = "crates_vendor",
cargo_lockfile = "//bazel/cargo/wasmsign:Cargo.Bazel.lock",
manifests = ["//bazel/cargo/wasmsign:Cargo.toml"],
mode = "remote",
generate_target_compatible_with = False,
# supported_platform_triples = SUPPORTED_PLATFORM_TRIPLES,
tags = ["manual"],
vendor_path = "//bazel/cargo/wasmsign/remote",
)
239 changes: 239 additions & 0 deletions bazel/cargo/wasmsign/Cargo.Bazel.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,239 @@
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.

[[package]]
name = "ansi_term"
version = "0.12.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2"
dependencies = [
"winapi",
]

[[package]]
name = "anyhow"
version = "1.0.53"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "94a45b455c14666b85fc40a019e8ab9eb75e3a124e05494f5397122bc9eb06e0"

[[package]]
name = "atty"
version = "0.2.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8"
dependencies = [
"hermit-abi",
"libc",
"winapi",
]

[[package]]
name = "bitflags"
version = "1.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"

[[package]]
name = "byteorder"
version = "1.4.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610"

[[package]]
name = "cfg-if"
version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"

[[package]]
name = "clap"
version = "2.34.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a0610544180c38b88101fecf2dd634b174a62eef6946f84dfc6a7127512b381c"
dependencies = [
"ansi_term",
"atty",
"bitflags",
"strsim",
"textwrap",
"unicode-width",
"vec_map",
]

[[package]]
name = "ed25519-compact"
version = "1.0.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "302ea73924517e9952bf08b505536f757e28dca8372cbf8b20723a0e2bab6c01"
dependencies = [
"getrandom",
]

[[package]]
name = "getrandom"
version = "0.2.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "418d37c8b1d42553c93648be529cb70f920d3baf8ef469b74b9638df426e0b4c"
dependencies = [
"cfg-if",
"libc",
"wasi",
]

[[package]]
name = "hermit-abi"
version = "0.1.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33"
dependencies = [
"libc",
]

[[package]]
name = "hmac-sha512"
version = "1.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6b2ce076d8070f292037093a825343f6341fe0ce873268c2477e2f49abd57b10"

[[package]]
name = "libc"
version = "0.2.114"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b0005d08a8f7b65fb8073cb697aa0b12b631ed251ce73d862ce50eeb52ce3b50"

[[package]]
name = "parity-wasm"
version = "0.42.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "be5e13c266502aadf83426d87d81a0f5d1ef45b8027f5a471c360abfe4bfae92"

[[package]]
name = "proc-macro2"
version = "1.0.36"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c7342d5883fbccae1cc37a2353b09c87c9b0f3afd73f5fb9bba687a1f733b029"
dependencies = [
"unicode-xid",
]

[[package]]
name = "quote"
version = "1.0.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "864d3e96a899863136fc6e99f3d7cae289dafe43bf2c5ac19b70df7210c0a145"
dependencies = [
"proc-macro2",
]

[[package]]
name = "strsim"
version = "0.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a"

[[package]]
name = "syn"
version = "1.0.86"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8a65b3f4ffa0092e9887669db0eae07941f023991ab58ea44da8fe8e2d511c6b"
dependencies = [
"proc-macro2",
"quote",
"unicode-xid",
]

[[package]]
name = "textwrap"
version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060"
dependencies = [
"unicode-width",
]

[[package]]
name = "thiserror"
version = "1.0.30"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "854babe52e4df1653706b98fcfc05843010039b406875930a70e4d9644e5c417"
dependencies = [
"thiserror-impl",
]

[[package]]
name = "thiserror-impl"
version = "1.0.30"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "aa32fd3f627f367fe16f893e2597ae3c05020f8bba2666a4e6ea73d377e5714b"
dependencies = [
"proc-macro2",
"quote",
"syn",
]

[[package]]
name = "unicode-width"
version = "0.1.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3ed742d4ea2bd1176e236172c8429aaf54486e7ac098db29ffe6529e0ce50973"

[[package]]
name = "unicode-xid"
version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8ccb82d61f80a663efe1f787a51b16b5a51e3314d6ac365b08639f52387b33f3"

[[package]]
name = "vec_map"
version = "0.8.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191"

[[package]]
name = "wasi"
version = "0.10.2+wasi-snapshot-preview1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6"

[[package]]
name = "wasmsign"
version = "0.1.2"
source = "git+https://github.com/jedisct1/wasmsign#dfbc0aabe81885d59e88e667aa9c1e6a62dfe9cc"
dependencies = [
"anyhow",
"byteorder",
"clap",
"ed25519-compact",
"hmac-sha512",
"parity-wasm",
"thiserror",
]

[[package]]
name = "wasmsign-bazel"
version = "0.1.2"
dependencies = [
"wasmsign",
]

[[package]]
name = "winapi"
version = "0.3.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419"
dependencies = [
"winapi-i686-pc-windows-gnu",
"winapi-x86_64-pc-windows-gnu",
]

[[package]]
name = "winapi-i686-pc-windows-gnu"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"

[[package]]
name = "winapi-x86_64-pc-windows-gnu"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
6 changes: 3 additions & 3 deletions bazel/cargo/wasmsign/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ rust_rules_workspace_name = "rules_rust"
gen_workspace_prefix = "wasmsign"
genmode = "Remote"
package_aliases_dir = "."
workspace_path = "//bazel/cargo/wasmsign"
workspace_path = "//bazel/cargo/wasmsign/remote"

[package.metadata.raze.crates.wasmsign.'*']
extra_aliased_targets = ["cargo_bin_wasmsign"]
# [package.metadata.raze.crates.wasmsign.'*']
# extra_aliased_targets = ["wasmsign"]
Loading
Loading