Skip to content

Commit

Permalink
Pull @rules_rust in cargo_raze_repositories(). (#396)
Browse files Browse the repository at this point in the history
Signed-off-by: Piotr Sikora <[email protected]>
  • Loading branch information
PiotrSikora authored Mar 15, 2021
1 parent bb3a328 commit 272f80b
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 22 deletions.
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()

0 comments on commit 272f80b

Please sign in to comment.