Skip to content
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

Update cargo-raze to latest and regenerate artifacts. #47

Merged
merged 2 commits into from
Nov 6, 2020
Merged
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 .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ jobs:

- name: Format (cargo raze)
run: |
cargo install cargo-raze --version 0.3.8
cargo install cargo-raze --git https://github.com/google/cargo-raze --rev cb9f85d22b1c81cceb9acaf1fa4336c5fc4e6bff
cp -p bazel/cargo/Cargo.lock .
rm -rf bazel/cargo/
cargo raze --output=bazel/cargo
Expand Down
5 changes: 2 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,11 @@ lto = true
opt-level = 3
panic = "abort"

[raze]
[package.metadata.raze]
workspace_path = "//bazel/cargo"
target = "wasm32-unknown-unknown"
genmode = "Remote"

[raze.crates.log.'0.4.11']
[package.metadata.raze.crates.log.'0.4.11']
additional_flags = ["--cfg=atomic_cas"]

[[example]]
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@

When updating dependencies, you need to regenerate `BUILD` files to match updated `Cargo.toml`:
```
cargo install cargo-raze --version 0.3.8
cargo install cargo-raze --git https://github.com/google/cargo-raze --rev cb9f85d22b1c81cceb9acaf1fa4336c5fc4e6bff
rm -rf bazel/cargo/
cargo generate-lockfile
cargo raze --output=bazel/cargo
mv Cargo.lock bazel/cargo/
```
```
25 changes: 20 additions & 5 deletions bazel/cargo/BUILD → bazel/cargo/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,25 +1,40 @@
"""
cargo-raze workspace build file.
@generated
cargo-raze generated Bazel file.

DO NOT EDIT! Replaced on runs of cargo-raze
"""

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

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

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

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

alias(
name = "log",
actual = "@raze__log__0_4_11//:log",
tags = ["cargo-raze"],
tags = [
"cargo-raze",
"manual",
],
)
116 changes: 62 additions & 54 deletions bazel/cargo/crates.bzl
Original file line number Diff line number Diff line change
@@ -1,144 +1,152 @@
"""
cargo-raze crate workspace functions
@generated
cargo-raze generated Bazel file.

DO NOT EDIT! Replaced on runs of cargo-raze
"""
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
load("@bazel_tools//tools/build_defs/repo:git.bzl", "new_git_repository")

def _new_http_archive(name, **kwargs):
if not native.existing_rule(name):
http_archive(name=name, **kwargs)

def _new_git_repository(name, **kwargs):
if not native.existing_rule(name):
new_git_repository(name=name, **kwargs)
load("@bazel_tools//tools/build_defs/repo:git.bzl", "new_git_repository") # buildifier: disable=load
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") # buildifier: disable=load
load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe") # buildifier: disable=load

def raze_fetch_remote_crates():

_new_http_archive(
"""This function defines a collection of repos and should be called in a WORKSPACE file"""
maybe(
http_archive,
name = "raze__ahash__0_4_6",
url = "https://crates-io.s3-us-west-1.amazonaws.com/crates/ahash/ahash-0.4.6.crate",
url = "https://crates.io/api/v1/crates/ahash/0.4.6/download",
type = "tar.gz",
sha256 = "f6789e291be47ace86a60303502173d84af8327e3627ecf334356ee0f87a164c",
strip_prefix = "ahash-0.4.6",
build_file = Label("//bazel/cargo/remote:ahash-0.4.6.BUILD"),
build_file = Label("//bazel/cargo/remote:BUILD.ahash-0.4.6.bazel"),
)

_new_http_archive(
maybe(
http_archive,
name = "raze__autocfg__1_0_1",
url = "https://crates-io.s3-us-west-1.amazonaws.com/crates/autocfg/autocfg-1.0.1.crate",
url = "https://crates.io/api/v1/crates/autocfg/1.0.1/download",
type = "tar.gz",
sha256 = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a",
strip_prefix = "autocfg-1.0.1",
build_file = Label("//bazel/cargo/remote:autocfg-1.0.1.BUILD"),
build_file = Label("//bazel/cargo/remote:BUILD.autocfg-1.0.1.bazel"),
)

_new_http_archive(
maybe(
http_archive,
name = "raze__cfg_if__0_1_10",
url = "https://crates-io.s3-us-west-1.amazonaws.com/crates/cfg-if/cfg-if-0.1.10.crate",
url = "https://crates.io/api/v1/crates/cfg-if/0.1.10/download",
type = "tar.gz",
sha256 = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822",
strip_prefix = "cfg-if-0.1.10",
build_file = Label("//bazel/cargo/remote:cfg-if-0.1.10.BUILD"),
build_file = Label("//bazel/cargo/remote:BUILD.cfg-if-0.1.10.bazel"),
)

_new_http_archive(
maybe(
http_archive,
name = "raze__chrono__0_4_19",
url = "https://crates-io.s3-us-west-1.amazonaws.com/crates/chrono/chrono-0.4.19.crate",
url = "https://crates.io/api/v1/crates/chrono/0.4.19/download",
type = "tar.gz",
sha256 = "670ad68c9088c2a963aaa298cb369688cf3f9465ce5e2d4ca10e6e0098a1ce73",
strip_prefix = "chrono-0.4.19",
build_file = Label("//bazel/cargo/remote:chrono-0.4.19.BUILD"),
build_file = Label("//bazel/cargo/remote:BUILD.chrono-0.4.19.bazel"),
)

_new_http_archive(
maybe(
http_archive,
name = "raze__hashbrown__0_9_1",
url = "https://crates-io.s3-us-west-1.amazonaws.com/crates/hashbrown/hashbrown-0.9.1.crate",
url = "https://crates.io/api/v1/crates/hashbrown/0.9.1/download",
type = "tar.gz",
sha256 = "d7afe4a420e3fe79967a00898cc1f4db7c8a49a9333a29f8a4bd76a253d5cd04",
strip_prefix = "hashbrown-0.9.1",
build_file = Label("//bazel/cargo/remote:hashbrown-0.9.1.BUILD"),
build_file = Label("//bazel/cargo/remote:BUILD.hashbrown-0.9.1.bazel"),
)

_new_http_archive(
maybe(
http_archive,
name = "raze__libc__0_2_80",
url = "https://crates-io.s3-us-west-1.amazonaws.com/crates/libc/libc-0.2.80.crate",
url = "https://crates.io/api/v1/crates/libc/0.2.80/download",
type = "tar.gz",
sha256 = "4d58d1b70b004888f764dfbf6a26a3b0342a1632d33968e4a179d8011c760614",
strip_prefix = "libc-0.2.80",
build_file = Label("//bazel/cargo/remote:libc-0.2.80.BUILD"),
build_file = Label("//bazel/cargo/remote:BUILD.libc-0.2.80.bazel"),
)

_new_http_archive(
maybe(
http_archive,
name = "raze__log__0_4_11",
url = "https://crates-io.s3-us-west-1.amazonaws.com/crates/log/log-0.4.11.crate",
url = "https://crates.io/api/v1/crates/log/0.4.11/download",
type = "tar.gz",
sha256 = "4fabed175da42fed1fa0746b0ea71f412aa9d35e76e95e59b192c64b9dc2bf8b",
strip_prefix = "log-0.4.11",
build_file = Label("//bazel/cargo/remote:log-0.4.11.BUILD"),
build_file = Label("//bazel/cargo/remote:BUILD.log-0.4.11.bazel"),
)

_new_http_archive(
maybe(
http_archive,
name = "raze__num_integer__0_1_44",
url = "https://crates-io.s3-us-west-1.amazonaws.com/crates/num-integer/num-integer-0.1.44.crate",
url = "https://crates.io/api/v1/crates/num-integer/0.1.44/download",
type = "tar.gz",
sha256 = "d2cc698a63b549a70bc047073d2949cce27cd1c7b0a4a862d08a8031bc2801db",
strip_prefix = "num-integer-0.1.44",
build_file = Label("//bazel/cargo/remote:num-integer-0.1.44.BUILD"),
build_file = Label("//bazel/cargo/remote:BUILD.num-integer-0.1.44.bazel"),
)

_new_http_archive(
maybe(
http_archive,
name = "raze__num_traits__0_2_14",
url = "https://crates-io.s3-us-west-1.amazonaws.com/crates/num-traits/num-traits-0.2.14.crate",
url = "https://crates.io/api/v1/crates/num-traits/0.2.14/download",
type = "tar.gz",
sha256 = "9a64b1ec5cda2586e284722486d802acf1f7dbdc623e2bfc57e65ca1cd099290",
strip_prefix = "num-traits-0.2.14",
build_file = Label("//bazel/cargo/remote:num-traits-0.2.14.BUILD"),
build_file = Label("//bazel/cargo/remote:BUILD.num-traits-0.2.14.bazel"),
)

_new_http_archive(
maybe(
http_archive,
name = "raze__time__0_1_44",
url = "https://crates-io.s3-us-west-1.amazonaws.com/crates/time/time-0.1.44.crate",
url = "https://crates.io/api/v1/crates/time/0.1.44/download",
type = "tar.gz",
sha256 = "6db9e6914ab8b1ae1c260a4ae7a49b6c5611b40328a735b21862567685e73255",
strip_prefix = "time-0.1.44",
build_file = Label("//bazel/cargo/remote:time-0.1.44.BUILD"),
build_file = Label("//bazel/cargo/remote:BUILD.time-0.1.44.bazel"),
)

_new_http_archive(
maybe(
http_archive,
name = "raze__wasi__0_10_0_wasi_snapshot_preview1",
url = "https://crates-io.s3-us-west-1.amazonaws.com/crates/wasi/wasi-0.10.0+wasi-snapshot-preview1.crate",
url = "https://crates.io/api/v1/crates/wasi/0.10.0+wasi-snapshot-preview1/download",
type = "tar.gz",
sha256 = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f",
strip_prefix = "wasi-0.10.0+wasi-snapshot-preview1",
build_file = Label("//bazel/cargo/remote:wasi-0.10.0+wasi-snapshot-preview1.BUILD"),
build_file = Label("//bazel/cargo/remote:BUILD.wasi-0.10.0+wasi-snapshot-preview1.bazel"),
)

_new_http_archive(
maybe(
http_archive,
name = "raze__winapi__0_3_9",
url = "https://crates-io.s3-us-west-1.amazonaws.com/crates/winapi/winapi-0.3.9.crate",
url = "https://crates.io/api/v1/crates/winapi/0.3.9/download",
type = "tar.gz",
sha256 = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419",
strip_prefix = "winapi-0.3.9",
build_file = Label("//bazel/cargo/remote:winapi-0.3.9.BUILD"),
build_file = Label("//bazel/cargo/remote:BUILD.winapi-0.3.9.bazel"),
)

_new_http_archive(
maybe(
http_archive,
name = "raze__winapi_i686_pc_windows_gnu__0_4_0",
url = "https://crates-io.s3-us-west-1.amazonaws.com/crates/winapi-i686-pc-windows-gnu/winapi-i686-pc-windows-gnu-0.4.0.crate",
url = "https://crates.io/api/v1/crates/winapi-i686-pc-windows-gnu/0.4.0/download",
type = "tar.gz",
sha256 = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6",
strip_prefix = "winapi-i686-pc-windows-gnu-0.4.0",
build_file = Label("//bazel/cargo/remote:winapi-i686-pc-windows-gnu-0.4.0.BUILD"),
build_file = Label("//bazel/cargo/remote:BUILD.winapi-i686-pc-windows-gnu-0.4.0.bazel"),
)

_new_http_archive(
maybe(
http_archive,
name = "raze__winapi_x86_64_pc_windows_gnu__0_4_0",
url = "https://crates-io.s3-us-west-1.amazonaws.com/crates/winapi-x86_64-pc-windows-gnu/winapi-x86_64-pc-windows-gnu-0.4.0.crate",
url = "https://crates.io/api/v1/crates/winapi-x86_64-pc-windows-gnu/0.4.0/download",
type = "tar.gz",
sha256 = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f",
strip_prefix = "winapi-x86_64-pc-windows-gnu-0.4.0",
build_file = Label("//bazel/cargo/remote:winapi-x86_64-pc-windows-gnu-0.4.0.BUILD"),
build_file = Label("//bazel/cargo/remote:BUILD.winapi-x86_64-pc-windows-gnu-0.4.0.bazel"),
)

Original file line number Diff line number Diff line change
@@ -1,48 +1,62 @@
"""
@generated
cargo-raze crate build file.

DO NOT EDIT! Replaced on runs of cargo-raze
"""
package(default_visibility = [
# Public for visibility by "@raze__crate__version//" targets.
#
# Prefer access through "//bazel/cargo", which limits external
# visibility to explicit Cargo.toml dependencies.
"//visibility:public",
])

licenses([
"notice", # MIT from expression "MIT OR Apache-2.0"
])

# buildifier: disable=load
load(
"@io_bazel_rules_rust//rust:rust.bzl",
"rust_library",
"rust_binary",
"rust_library",
"rust_test",
)

# buildifier: disable=load
load("@bazel_skylib//lib:selects.bzl", "selects")

package(default_visibility = [
# Public for visibility by "@raze__crate__version//" targets.
#
# Prefer access through "//bazel/cargo", which limits external
# visibility to explicit Cargo.toml dependencies.
"//visibility:public",
])

licenses([
"notice", # MIT from expression "MIT OR Apache-2.0"
])

# Generated Targets

# Unsupported target "ahash" with type "bench" omitted

# Unsupported target "map" with type "bench" omitted

rust_library(
name = "ahash",
crate_type = "lib",
deps = [
],
srcs = glob(["**/*.rs"]),
crate_features = [
],
crate_root = "src/lib.rs",
crate_type = "lib",
edition = "2018",
rustc_flags = [
"--cap-lints=allow",
],
tags = [
"cargo-raze",
"manual",
],
version = "0.4.6",
tags = ["cargo-raze"],
crate_features = [
# buildifier: leave-alone
deps = [
],
)

# Unsupported target "bench" with type "test" omitted
# Unsupported target "map" with type "bench" omitted

# Unsupported target "map_tests" with type "test" omitted

# Unsupported target "nopanic" with type "test" omitted
Loading