Skip to content

Commit

Permalink
Binary dependencies smoketest (#240)
Browse files Browse the repository at this point in the history
* Added binary_dependency example

* Updated examples
  • Loading branch information
UebelAndre authored Oct 14, 2020
1 parent aa4ec3b commit 05a45b9
Show file tree
Hide file tree
Showing 97 changed files with 9,071 additions and 0 deletions.
4 changes: 4 additions & 0 deletions examples/WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ load("@io_bazel_rules_rust//:workspace.bzl", "rust_workspace")

rust_workspace()

load("//remote/binary_dependencies/cargo:crates.bzl", "remote_binary_dependencies_fetch_remote_crates")

remote_binary_dependencies_fetch_remote_crates()

load("//remote/complicated_cargo_library/cargo:crates.bzl", "remote_complicated_cargo_library_fetch_remote_crates")

remote_complicated_cargo_library_fetch_remote_crates()
Expand Down
14 changes: 14 additions & 0 deletions examples/remote/binary_dependencies/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
load("@io_bazel_rules_rust//rust:rust.bzl", "rust_binary")

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

rust_binary(
name = "binary_dependencies_bin",
srcs = ["src/main.rs"],
data = [
"//remote/binary_dependencies/cargo:cargo_bin_texture_synthesis",
],
deps = [
"//remote/binary_dependencies/cargo:ferris_says",
],
)
210 changes: 210 additions & 0 deletions examples/remote/binary_dependencies/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 30 additions & 0 deletions examples/remote/binary_dependencies/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
[package]
name = "binary_dependencies"
version = "0.1.0"
authors = ["UebelAndre <[email protected]>"]

[[bin]]
name = "binary_dependencies"
path = "src/main.rs"

[dependencies]
ferris-says = "0.2.0"

[raze]
workspace_path = "//remote/binary_dependencies/cargo"
gen_workspace_prefix = "remote_binary_dependencies"
genmode = "Remote"
incompatible_relative_workspace_path = true
default_gen_buildrs = true

[raze.binary_deps]
texture-synthesis-cli = "0.8.0"

[raze.crates.texture-synthesis-cli.'0.8.0']
extra_aliased_targets = ["cargo_bin_texture_synthesis"]

[raze.crates.crossbeam-utils.'0.7.2']
gen_buildrs = false

[raze.crates.image.'0.23.0']
data_attr = "[\"README.md\"]"
3 changes: 3 additions & 0 deletions examples/remote/binary_dependencies/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# binary_dependency

This demonstrates a binary dependency being made available as a `rust_binary`
69 changes: 69 additions & 0 deletions examples/remote/binary_dependencies/cargo/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
"""
@generated
cargo-raze workspace build file.
DO NOT EDIT! Replaced on runs of cargo-raze
"""

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

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

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

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

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

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

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

alias(
# Extra aliased target, from raze configuration
# N.B.: The exact form of this is subject to change.
name = "cargo_bin_texture_synthesis",
actual = "@remote_binary_dependencies__texture_synthesis_cli__0_8_0//:cargo_bin_texture_synthesis",
tags = [
"cargo-raze",
"manual",
],
)
Loading

0 comments on commit 05a45b9

Please sign in to comment.