forked from mirrors/jj
buck: add initial reindeer scaffold
Summary: `buck2 build third-party//rust` works fine here. Signed-off-by: Austin Seipp <aseipp@pobox.com>
This commit is contained in:
parent
d563775c1e
commit
af2610b305
7 changed files with 335 additions and 0 deletions
200
buck/third-party/rust/BUILD
vendored
Normal file
200
buck/third-party/rust/BUILD
vendored
Normal file
|
@ -0,0 +1,200 @@
|
|||
# @generated by `reindeer buckify`
|
||||
|
||||
load("@root//buck/shims/third_party_rust.bzl", "third_party_rust")
|
||||
|
||||
# XXX (aseipp): this is a hack to provide a convenient top-level alias.
|
||||
# this allows us to just build `third-party//rust` without a target name
|
||||
# to build everything we need.
|
||||
# this should probably be part of reindeer itself?
|
||||
|
||||
alias(
|
||||
name = 'rust',
|
||||
actual = ':rust-third-party-0.0.0-top',
|
||||
visibility = ["PUBLIC"],
|
||||
)
|
||||
|
||||
# XXX: normal reindeer-generated code below
|
||||
|
||||
alias(
|
||||
name = "blake2",
|
||||
actual = ":blake2-0.10.6",
|
||||
visibility = ["PUBLIC"],
|
||||
)
|
||||
|
||||
http_archive(
|
||||
name = "blake2-0.10.6.crate",
|
||||
sha256 = "46502ad458c9a52b69d4d4d32775c788b7a1b85e8bc9d482d92250fc0e3f8efe",
|
||||
strip_prefix = "blake2-0.10.6",
|
||||
urls = ["https://static.crates.io/crates/blake2/0.10.6/download"],
|
||||
visibility = [],
|
||||
)
|
||||
|
||||
third_party_rust.rust_library(
|
||||
name = "blake2-0.10.6",
|
||||
srcs = [":blake2-0.10.6.crate"],
|
||||
crate = "blake2",
|
||||
crate_root = "blake2-0.10.6.crate/src/lib.rs",
|
||||
edition = "2018",
|
||||
features = [
|
||||
"default",
|
||||
"std",
|
||||
],
|
||||
visibility = [],
|
||||
deps = [":digest-0.10.7"],
|
||||
)
|
||||
|
||||
http_archive(
|
||||
name = "block-buffer-0.10.4.crate",
|
||||
sha256 = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71",
|
||||
strip_prefix = "block-buffer-0.10.4",
|
||||
urls = ["https://static.crates.io/crates/block-buffer/0.10.4/download"],
|
||||
visibility = [],
|
||||
)
|
||||
|
||||
third_party_rust.rust_library(
|
||||
name = "block-buffer-0.10.4",
|
||||
srcs = [":block-buffer-0.10.4.crate"],
|
||||
crate = "block_buffer",
|
||||
crate_root = "block-buffer-0.10.4.crate/src/lib.rs",
|
||||
edition = "2018",
|
||||
visibility = [],
|
||||
deps = [":generic-array-0.14.7"],
|
||||
)
|
||||
|
||||
http_archive(
|
||||
name = "crypto-common-0.1.6.crate",
|
||||
sha256 = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3",
|
||||
strip_prefix = "crypto-common-0.1.6",
|
||||
urls = ["https://static.crates.io/crates/crypto-common/0.1.6/download"],
|
||||
visibility = [],
|
||||
)
|
||||
|
||||
third_party_rust.rust_library(
|
||||
name = "crypto-common-0.1.6",
|
||||
srcs = [":crypto-common-0.1.6.crate"],
|
||||
crate = "crypto_common",
|
||||
crate_root = "crypto-common-0.1.6.crate/src/lib.rs",
|
||||
edition = "2018",
|
||||
features = ["std"],
|
||||
visibility = [],
|
||||
deps = [
|
||||
":generic-array-0.14.7",
|
||||
":typenum-1.17.0",
|
||||
],
|
||||
)
|
||||
|
||||
http_archive(
|
||||
name = "digest-0.10.7.crate",
|
||||
sha256 = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292",
|
||||
strip_prefix = "digest-0.10.7",
|
||||
urls = ["https://static.crates.io/crates/digest/0.10.7/download"],
|
||||
visibility = [],
|
||||
)
|
||||
|
||||
third_party_rust.rust_library(
|
||||
name = "digest-0.10.7",
|
||||
srcs = [":digest-0.10.7.crate"],
|
||||
crate = "digest",
|
||||
crate_root = "digest-0.10.7.crate/src/lib.rs",
|
||||
edition = "2018",
|
||||
features = [
|
||||
"alloc",
|
||||
"block-buffer",
|
||||
"core-api",
|
||||
"default",
|
||||
"mac",
|
||||
"std",
|
||||
"subtle",
|
||||
],
|
||||
visibility = [],
|
||||
deps = [
|
||||
":block-buffer-0.10.4",
|
||||
":crypto-common-0.1.6",
|
||||
":subtle-2.5.0",
|
||||
],
|
||||
)
|
||||
|
||||
http_archive(
|
||||
name = "generic-array-0.14.7.crate",
|
||||
sha256 = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a",
|
||||
strip_prefix = "generic-array-0.14.7",
|
||||
urls = ["https://static.crates.io/crates/generic-array/0.14.7/download"],
|
||||
visibility = [],
|
||||
)
|
||||
|
||||
third_party_rust.rust_library(
|
||||
name = "generic-array-0.14.7",
|
||||
srcs = [":generic-array-0.14.7.crate"],
|
||||
crate = "generic_array",
|
||||
crate_root = "generic-array-0.14.7.crate/src/lib.rs",
|
||||
edition = "2015",
|
||||
features = ["more_lengths"],
|
||||
visibility = [],
|
||||
deps = [":typenum-1.17.0"],
|
||||
)
|
||||
|
||||
third_party_rust.rust_binary(
|
||||
name = "rust-third-party-0.0.0-top",
|
||||
srcs = ["top.rs"],
|
||||
crate = "top",
|
||||
crate_root = "top.rs",
|
||||
edition = "2021",
|
||||
visibility = [],
|
||||
deps = [":blake2-0.10.6"],
|
||||
)
|
||||
|
||||
http_archive(
|
||||
name = "subtle-2.5.0.crate",
|
||||
sha256 = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc",
|
||||
strip_prefix = "subtle-2.5.0",
|
||||
urls = ["https://static.crates.io/crates/subtle/2.5.0/download"],
|
||||
visibility = [],
|
||||
)
|
||||
|
||||
third_party_rust.rust_library(
|
||||
name = "subtle-2.5.0",
|
||||
srcs = [":subtle-2.5.0.crate"],
|
||||
crate = "subtle",
|
||||
crate_root = "subtle-2.5.0.crate/src/lib.rs",
|
||||
edition = "2018",
|
||||
visibility = [],
|
||||
)
|
||||
|
||||
http_archive(
|
||||
name = "typenum-1.17.0.crate",
|
||||
sha256 = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825",
|
||||
strip_prefix = "typenum-1.17.0",
|
||||
urls = ["https://static.crates.io/crates/typenum/1.17.0/download"],
|
||||
visibility = [],
|
||||
)
|
||||
|
||||
third_party_rust.rust_library(
|
||||
name = "typenum-1.17.0",
|
||||
srcs = [":typenum-1.17.0.crate"],
|
||||
crate = "typenum",
|
||||
crate_root = "typenum-1.17.0.crate/src/lib.rs",
|
||||
edition = "2018",
|
||||
env = {
|
||||
"OUT_DIR": "$(location :typenum-1.17.0-build-script-main-run[out_dir])",
|
||||
},
|
||||
features = ["force_unix_path_separator"],
|
||||
visibility = [],
|
||||
)
|
||||
|
||||
third_party_rust.rust_binary(
|
||||
name = "typenum-1.17.0-build-script-main",
|
||||
srcs = [":typenum-1.17.0.crate"],
|
||||
crate = "build_script_main",
|
||||
crate_root = "typenum-1.17.0.crate/build/main.rs",
|
||||
edition = "2018",
|
||||
features = ["force_unix_path_separator"],
|
||||
visibility = [],
|
||||
)
|
||||
|
||||
third_party_rust.buildscript_run(
|
||||
name = "typenum-1.17.0-build-script-main-run",
|
||||
package_name = "typenum",
|
||||
buildscript_rule = ":typenum-1.17.0-build-script-main",
|
||||
features = ["force_unix_path_separator"],
|
||||
version = "1.17.0",
|
||||
)
|
77
buck/third-party/rust/Cargo.lock
generated
vendored
Normal file
77
buck/third-party/rust/Cargo.lock
generated
vendored
Normal file
|
@ -0,0 +1,77 @@
|
|||
# This file is automatically @generated by Cargo.
|
||||
# It is not intended for manual editing.
|
||||
version = 3
|
||||
|
||||
[[package]]
|
||||
name = "blake2"
|
||||
version = "0.10.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "46502ad458c9a52b69d4d4d32775c788b7a1b85e8bc9d482d92250fc0e3f8efe"
|
||||
dependencies = [
|
||||
"digest",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "block-buffer"
|
||||
version = "0.10.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71"
|
||||
dependencies = [
|
||||
"generic-array",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "crypto-common"
|
||||
version = "0.1.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3"
|
||||
dependencies = [
|
||||
"generic-array",
|
||||
"typenum",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "digest"
|
||||
version = "0.10.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292"
|
||||
dependencies = [
|
||||
"block-buffer",
|
||||
"crypto-common",
|
||||
"subtle",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "generic-array"
|
||||
version = "0.14.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a"
|
||||
dependencies = [
|
||||
"typenum",
|
||||
"version_check",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rust-third-party"
|
||||
version = "0.0.0"
|
||||
dependencies = [
|
||||
"blake2",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "subtle"
|
||||
version = "2.5.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc"
|
||||
|
||||
[[package]]
|
||||
name = "typenum"
|
||||
version = "1.17.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825"
|
||||
|
||||
[[package]]
|
||||
name = "version_check"
|
||||
version = "0.9.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f"
|
15
buck/third-party/rust/Cargo.toml
vendored
Normal file
15
buck/third-party/rust/Cargo.toml
vendored
Normal file
|
@ -0,0 +1,15 @@
|
|||
[workspace]
|
||||
|
||||
[package]
|
||||
name = "rust-third-party"
|
||||
version = "0.0.0"
|
||||
publish = false
|
||||
edition = "2021"
|
||||
|
||||
# Dummy target to keep Cargo happy
|
||||
[[bin]]
|
||||
name = "top"
|
||||
path = "top.rs"
|
||||
|
||||
[dependencies]
|
||||
blake2 = "0.10.6"
|
1
buck/third-party/rust/fixups/generic-array/fixups.toml
vendored
Normal file
1
buck/third-party/rust/fixups/generic-array/fixups.toml
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
buildscript = []
|
4
buck/third-party/rust/fixups/typenum/fixups.toml
vendored
Normal file
4
buck/third-party/rust/fixups/typenum/fixups.toml
vendored
Normal file
|
@ -0,0 +1,4 @@
|
|||
features = ["force_unix_path_separator"]
|
||||
|
||||
[[buildscript]]
|
||||
[buildscript.gen_srcs]
|
35
buck/third-party/rust/reindeer.toml
vendored
Normal file
35
buck/third-party/rust/reindeer.toml
vendored
Normal file
|
@ -0,0 +1,35 @@
|
|||
vendor = false
|
||||
precise_srcs = true
|
||||
include_top_level = true
|
||||
fixup_templates = true
|
||||
|
||||
[buck]
|
||||
file_name = "BUILD"
|
||||
|
||||
alias = "alias"
|
||||
filegroup = "filegroup"
|
||||
http_archive = "http_archive"
|
||||
git_fetch = "git_fetch"
|
||||
|
||||
rust_library = "third_party_rust.rust_library"
|
||||
rust_binary = "third_party_rust.rust_binary"
|
||||
cxx_library = "third_party_rust.cxx_library"
|
||||
prebuilt_cxx_library = "third_party_rust.prebuilt_cxx_library"
|
||||
buildscript_genrule = "third_party_rust.buildscript_run"
|
||||
|
||||
buckfile_imports = """
|
||||
load("@root//buck/shims/third_party_rust.bzl", "third_party_rust")
|
||||
|
||||
# XXX (aseipp): this is a hack to provide a convenient top-level alias.
|
||||
# this allows us to just build `third-party//rust` without a target name
|
||||
# to build everything we need.
|
||||
# this should probably be part of reindeer itself?
|
||||
|
||||
alias(
|
||||
name = 'rust',
|
||||
actual = ':rust-third-party-0.0.0-top',
|
||||
visibility = ["PUBLIC"],
|
||||
)
|
||||
|
||||
# XXX: normal reindeer-generated code below
|
||||
"""
|
3
buck/third-party/rust/top.rs
vendored
Normal file
3
buck/third-party/rust/top.rs
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
// Dummy source to keep Cargo happy
|
||||
|
||||
fn main() {}
|
Loading…
Reference in a new issue