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

Pull @rules_rust in cargo_raze_repositories(). #396

Merged
merged 1 commit into from
Mar 15, 2021
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
3 changes: 0 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -232,9 +232,6 @@ on the host machine. To do so, simply add the following to the WORKSPACE file in
your project:

```python
# Note: The `cargo_raze` repository expects `rules_foreign_cc` and `rules_rust` to
# have already been specified in the WORKSPACE per the Usage section of the README.

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

http_archive(
Expand Down
19 changes: 0 additions & 19 deletions WORKSPACE.bazel
Original file line number Diff line number Diff line change
@@ -1,24 +1,5 @@
workspace(name = "cargo_raze")

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

http_archive(
name = "rules_rust",
sha256 = "accb5a89cbe63d55dcdae85938e56ff3aa56f21eb847ed826a28a83db8500ae6",
strip_prefix = "rules_rust-9aa49569b2b0dacecc51c05cee52708b7255bd98",
urls = [
# Main branch as of 2021-02-19
"https://github.com/bazelbuild/rules_rust/archive/9aa49569b2b0dacecc51c05cee52708b7255bd98.tar.gz",
],
)

load("@rules_rust//rust:repositories.bzl", "rust_repositories")

rust_repositories(
edition = "2018",
version = "1.49.0",
)

load("//:repositories.bzl", "cargo_raze_repositories")

cargo_raze_repositories()
Expand Down
9 changes: 9 additions & 0 deletions repositories.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,15 @@ load("//third_party/zlib:zlib_repositories.bzl", "zlib_repositories")
def cargo_raze_repositories():
"""Creates repository definitions for all cargo-raze third party dependencies"""

maybe(
http_archive,
name = "rules_rust",
sha256 = "accb5a89cbe63d55dcdae85938e56ff3aa56f21eb847ed826a28a83db8500ae6",
strip_prefix = "rules_rust-9aa49569b2b0dacecc51c05cee52708b7255bd98",
# Main branch as of 2021-02-19
url = "https://github.com/bazelbuild/rules_rust/archive/9aa49569b2b0dacecc51c05cee52708b7255bd98.tar.gz",
)

maybe(
http_archive,
name = "rules_foreign_cc",
Expand Down
2 changes: 2 additions & 0 deletions transitive_deps.bzl
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
"""A module defining the transitive dependencies of cargo-raze"""

load("@rules_foreign_cc//:workspace_definitions.bzl", "rules_foreign_cc_dependencies")
load("@rules_rust//rust:repositories.bzl", "rust_repositories")

def cargo_raze_transitive_deps():
"""Loads all dependnecies from repositories required for cargo-raze"""
rules_foreign_cc_dependencies()
rust_repositories()