-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #881 from Hou-Xiaoxuan/buck-mono
Build `mono` with buck2
- Loading branch information
Showing
99 changed files
with
15,894 additions
and
1,504 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
rust_library ( | ||
name = "ceres", | ||
srcs = glob(["src/**/*.rs"]), | ||
crate_root = "src/lib.rs", | ||
deps = [ | ||
"//jupiter/callisto:callisto", | ||
"//common:common", | ||
"//mercury:mercury", | ||
"//jupiter:jupiter", | ||
"//third-party:anyhow", | ||
"//third-party:tokio", | ||
"//third-party:tokio-stream", | ||
"//third-party:axum", | ||
"//third-party:tracing", | ||
"//third-party:serde", | ||
"//third-party:serde_json", | ||
"//third-party:clap", | ||
"//third-party:chrono", | ||
"//third-party:futures", | ||
"//third-party:bytes", | ||
"//third-party:async-trait", | ||
"//third-party:rand", | ||
"//third-party:sea-orm", | ||
"//third-party:ring", | ||
"//third-party:hex", | ||
"//third-party:sysinfo", | ||
], | ||
visibility = [ | ||
'PUBLIC', | ||
], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
rust_library ( | ||
name = "common", | ||
srcs = [ | ||
"src/lib.rs", | ||
"src/config.rs", | ||
"src/enums.rs", | ||
"src/errors.rs", | ||
"src/model.rs", | ||
"src/utils.rs", | ||
"config.toml", | ||
], | ||
crate_root = "src/lib.rs", | ||
deps = [ | ||
"//third-party:axum", | ||
"//third-party:anyhow", | ||
"//third-party:sea-orm", | ||
"//third-party:thiserror", | ||
"//third-party:clap", | ||
"//third-party:idgenerator", | ||
"//third-party:serde", | ||
"//third-party:config", | ||
"//third-party:envsubst", | ||
"//third-party:rand", | ||
"//third-party:serde_json", | ||
"//third-party:regex", | ||
], | ||
visibility = [ | ||
'PUBLIC', | ||
], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../mega/config.toml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
rust_library ( | ||
name = "jupiter", | ||
srcs = glob(["src/**/*.rs", "sqlite_20241204_init.sql"]), # soft link must be file, not directory, for buck2 reason | ||
crate_root = "src/lib.rs", | ||
deps = [ | ||
"//jupiter/callisto:callisto", | ||
"//common:common", | ||
"//mercury:mercury", | ||
"//saturn:saturn", | ||
"//third-party:sea-orm", | ||
"//third-party:tracing", | ||
"//third-party:bytes", | ||
"//third-party:chrono", | ||
"//third-party:async-trait", | ||
"//third-party:futures", | ||
"//third-party:serde_json", | ||
"//third-party:idgenerator", | ||
"//third-party:serde", | ||
"//third-party:tokio", | ||
"//third-party:uuid", | ||
], | ||
visibility = [ | ||
'PUBLIC', | ||
], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
rust_library ( | ||
name = "callisto", | ||
srcs = glob(["src/**/*.rs"]), | ||
crate_root = "src/lib.rs", | ||
deps = [ | ||
"//third-party:serde", | ||
"//third-party:sea-orm", | ||
], | ||
visibility = [ | ||
'PUBLIC', | ||
], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../sql/sqlite/sqlite_20241204_init.sql |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
rust_library ( | ||
name = "mercury", | ||
srcs = glob(["src/**/*.rs"]), | ||
crate_root = "src/lib.rs", | ||
deps = [ | ||
"//mercury/delta:delta", | ||
"//common:common", | ||
"//jupiter/callisto:callisto", | ||
"//third-party:flate2", | ||
"//third-party:serde", | ||
"//third-party:bstr", | ||
"//third-party:hex", | ||
"//third-party:thiserror", | ||
"//third-party:tracing", | ||
"//third-party:sha1", | ||
"//third-party:colored", | ||
"//third-party:chrono", | ||
"//third-party:tracing-subscriber", | ||
"//third-party:uuid", | ||
"//third-party:threadpool", | ||
"//third-party:num_cpus", | ||
"//third-party:dashmap", | ||
"//third-party:tokio", | ||
"//third-party:lru-mem", | ||
"//third-party:bincode", | ||
"//third-party:byteorder", | ||
"//third-party:futures-util", | ||
"//third-party:bytes", | ||
"//third-party:axum", | ||
"//third-party:memchr", | ||
"//third-party:encoding_rs", | ||
"//third-party:rayon", | ||
"//third-party:tokio-util", | ||
], | ||
visibility = [ | ||
'PUBLIC', | ||
], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
rust_library ( | ||
name = "delta", | ||
srcs = glob(["src/**/*.rs"]), | ||
crate_root = "src/lib.rs", | ||
features = ["diff_mydrs"], | ||
deps = [ | ||
"//third-party:diffs", | ||
"//third-party:thiserror", | ||
"//third-party:flate2", | ||
], | ||
visibility = [ | ||
'PUBLIC', | ||
], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,66 @@ | ||
rust_binary( | ||
load("@prelude//rust:cargo_package.bzl", "cargo") | ||
|
||
cargo.rust_binary( | ||
name = "mono", | ||
srcs = glob(["src/**/*.rs"]), | ||
crate_root = "src/main.rs", | ||
) | ||
deps = [ | ||
"//jupiter/callisto:callisto", | ||
"//common:common", | ||
"//jupiter:jupiter", | ||
"//ceres:ceres", | ||
"//taurus:taurus", | ||
"//saturn:saturn", | ||
"//vault:vault", | ||
"//third-party:anyhow", | ||
"//third-party:axum", | ||
"//third-party:axum-server", | ||
"//third-party:tower", | ||
"//third-party:tracing", | ||
"//third-party:tracing-subscriber", | ||
"//third-party:tracing-appender", | ||
"//third-party:russh", | ||
"//third-party:serde", | ||
"//third-party:serde_json", | ||
"//third-party:chrono", | ||
"//third-party:futures", | ||
"//third-party:bytes", | ||
"//third-party:clap", | ||
"//third-party:tower-http", | ||
"//third-party:axum-extra", | ||
"//third-party:tokio", | ||
"//third-party:tokio-stream", | ||
"//third-party:async-stream", | ||
"//third-party:reqwest", | ||
"//third-party:uuid", | ||
"//third-party:regex", | ||
"//third-party:ed25519-dalek", | ||
"//third-party:lazy_static", | ||
"//third-party:ctrlc", | ||
"//third-party:shadow-rs", | ||
"//third-party:oauth2", | ||
"//third-party:base64", | ||
"//third-party:async-session", | ||
"//third-party:http", | ||
"//third-party:cedar-policy", | ||
"//third-party:jemallocator" | ||
], | ||
platform = { | ||
"linux": dict(deps = ["//third-party:jemallocator"]), | ||
"macos": dict(deps = ["//third-party:jemallocator"]), | ||
"windows": dict(deps = ["//third-party:mimalloc"]), | ||
}, | ||
env = { | ||
"CARGO_MANIFEST_DIR": ".", | ||
"CARGO_PKG_AUTHORS": "Quanyi Ma <[email protected]>", | ||
"CARGO_PKG_DESCRIPTION": "Mega-mono", | ||
"CARGO_PKG_NAME": "mono", | ||
"CARGO_PKG_VERSION": "0.1.0", | ||
"CARGO_PKG_VERSION_MAJOR": "0", | ||
"CARGO_PKG_VERSION_MINOR": "1", | ||
"CARGO_PKG_VERSION_PATCH": "0", | ||
}, | ||
visibility = [ | ||
"PUBLIC", | ||
], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,6 @@ authors = ["Quanyi Ma <[email protected]>"] | |
keywords = ["git", "monorepo", "decentralized"] | ||
license = "MIT OR Apache-2.0" | ||
readme = "README.md" | ||
build = "src/build.rs" | ||
|
||
[[bin]] | ||
name = "mono" | ||
|
@@ -50,7 +49,7 @@ regex = { workspace = true } | |
ed25519-dalek = { workspace = true, features = ["pkcs8"] } | ||
lazy_static = { workspace = true } | ||
ctrlc = { workspace = true } | ||
shadow-rs = { workspace = true } | ||
# shadow-rs = { workspace = true } | ||
oauth2 = { workspace = true } | ||
base64 = { workspace = true } | ||
async-session = "3.0.0" | ||
|
@@ -66,7 +65,7 @@ mimalloc = "0.1.43" | |
[dev-dependencies] | ||
|
||
[build-dependencies] | ||
shadow-rs = { workspace = true } | ||
# shadow-rs = { workspace = true } | ||
|
||
# [target.'cfg(not(target_env = "msvc"))'.dependencies] | ||
# tikv-jemallocator = "0.6" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
rust_library ( | ||
name = "saturn", | ||
srcs = glob(["src/**/*.rs", "mega_policies.cedar", "mega.cedarschema"]), | ||
crate_root = "src/lib.rs", | ||
deps = [ | ||
"//third-party:serde", | ||
"//third-party:serde_json", | ||
"//third-party:tracing", | ||
"//third-party:tracing-subscriber", | ||
"//third-party:thiserror", | ||
"//third-party:cedar-policy", | ||
"//third-party:itertools", | ||
], | ||
visibility = [ | ||
'PUBLIC', | ||
], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
rust_library ( | ||
name = "taurus", | ||
srcs = glob(["src/**/*.rs"]), | ||
crate_root = "src/lib.rs", | ||
deps = [ | ||
"//jupiter/callisto:callisto", | ||
"//common:common", | ||
"//jupiter:jupiter", | ||
"//third-party:axum", | ||
"//third-party:async-trait", | ||
"//third-party:tokio", | ||
"//third-party:tracing", | ||
"//third-party:thiserror", | ||
"//third-party:serde", | ||
"//third-party:serde_json", | ||
"//third-party:chrono", | ||
"//third-party:crossbeam-channel", | ||
|
||
], | ||
visibility = [ | ||
'PUBLIC', | ||
], | ||
) |
Oops, something went wrong.
0fc6fca
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
mega – ./
gitmega.dev
mega-git-main-gitmono.vercel.app
mega-gitmono.vercel.app
www.gitmega.dev