Skip to content

Commit

Permalink
refactor: first step to move all packages under src folder (#1226)
Browse files Browse the repository at this point in the history
## Rationale

The final result will be moved all packaged under the `src` folder so
that we have a consistent and concise layout.

Take materialize as an example:
https://github.com/MaterializeInc/materialize/tree/main/src

## Detailed Changes

First step: move `src` to `src/server` while keep all the effective code
and config the same. So that we get rid of the special case first.

## Test Plan

Everything should keep AS IS and existing tests should pass.

---------

Signed-off-by: tison <[email protected]>
  • Loading branch information
tisonkun authored Sep 25, 2023
1 parent 41f6313 commit c5d0430
Show file tree
Hide file tree
Showing 8 changed files with 61 additions and 41 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ jobs:
run: |
sudo apt update
sudo apt install --yes protobuf-compiler
- name: Install clippy rustfmt
- name: Install check binaries
run: |
rustup component add clippy
rustup component add rustfmt
Expand Down
41 changes: 1 addition & 40 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.

[package]
name = "ceresdb"
version = "1.2.6-alpha"
authors = ["CeresDB Authors <[email protected]>"]
edition = "2021"

[workspace.package]
version = "1.2.6-alpha"
authors = ["CeresDB Authors <[email protected]>"]
Expand Down Expand Up @@ -75,16 +69,13 @@ members = [
"remote_engine_client",
"router",
"server",
"src/ceresdb",
"system_catalog",
"table_engine",
"tools",
"wal",
]

[[bin]]
name = "ceresdb-server"
path = "src/bin/ceresdb-server.rs"

[workspace.dependencies]
alloc_tracker = { path = "components/alloc_tracker" }
arrow = { version = "43.0.0", features = ["prettyprint"] }
Expand Down Expand Up @@ -186,36 +177,6 @@ wal = { path = "wal" }
xorfilter-rs = { git = "https://github.com/CeresDB/xorfilter", rev = "ac8ef01" }
zstd = { version = "0.12", default-features = false }

[dependencies]
analytic_engine = { workspace = true }
catalog = { workspace = true }
catalog_impls = { workspace = true }
clap = { workspace = true }
cluster = { workspace = true }
datafusion = { workspace = true }
df_operator = { workspace = true }
etcd-client = { workspace = true }
interpreters = { workspace = true }
log = { workspace = true }
logger = { workspace = true }
meta_client = { workspace = true }
moka = { version = "0.10", features = ["future"] }
panic_ext = { workspace = true }
proxy = { workspace = true }
query_engine = { workspace = true }
router = { workspace = true }
runtime = { workspace = true }
serde = { workspace = true }
server = { workspace = true }
signal-hook = "0.3"
table_engine = { workspace = true }
toml = { workspace = true }
toml_ext = { workspace = true }
tracing_util = { workspace = true }

[build-dependencies]
vergen = { version = "8", default-features = false, features = ["build", "cargo", "git", "gitcl", "rustc"] }

# This profile optimizes for good runtime performance.
[profile.release]
# reference: https://doc.rust-lang.org/rustc/codegen-options/index.html#codegen-units
Expand Down
59 changes: 59 additions & 0 deletions src/ceresdb/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# Copyright 2023 The CeresDB Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

[package]
name = "ceresdb"

[package.version]
workspace = true

[package.authors]
workspace = true

[package.edition]
workspace = true

[dependencies]
analytic_engine = { workspace = true }
catalog = { workspace = true }
catalog_impls = { workspace = true }
clap = { workspace = true }
cluster = { workspace = true }
datafusion = { workspace = true }
df_operator = { workspace = true }
etcd-client = { workspace = true }
interpreters = { workspace = true }
log = { workspace = true }
logger = { workspace = true }
meta_client = { workspace = true }
moka = { version = "0.10", features = ["future"] }
panic_ext = { workspace = true }
proxy = { workspace = true }
query_engine = { workspace = true }
router = { workspace = true }
runtime = { workspace = true }
serde = { workspace = true }
server = { workspace = true }
signal-hook = "0.3"
table_engine = { workspace = true }
toml = { workspace = true }
toml_ext = { workspace = true }
tracing_util = { workspace = true }

[build-dependencies]
vergen = { version = "8", default-features = false, features = ["build", "cargo", "git", "gitcl", "rustc"] }

[[bin]]
name = "ceresdb-server"
path = "bin/ceresdb-server.rs"
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit c5d0430

Please sign in to comment.