Skip to content

Commit

Permalink
Crate layout
Browse files Browse the repository at this point in the history
  • Loading branch information
Asurar0 committed Sep 16, 2024
1 parent 37b4320 commit b2e6da6
Show file tree
Hide file tree
Showing 10 changed files with 121 additions and 67 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
**/target
.idea
/crates/lib/dummy_lib/Cargo.lock

Cargo.lock
config.toml
39 changes: 34 additions & 5 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

93 changes: 84 additions & 9 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,19 +1,94 @@
# FerrumC Project workspace
#
# Layout of this file:
# - Members of the workspace.
# - Profile compilation settings.
# - Workspace lints
# - Workspace dependencies.

[workspace]
resolver = "2"

#================= Members =================#
members = [
"crates/bin",
"crates/lib/*",
"src/bin",
"src/core",
"src/ecs",
"src/events",
"src/net",
"src/net/encryption",
"src/net/packets",
"src/plugins",
"src/storage",
"src/utils",
"src/world"
]
exclude = []

# Strip debuginfo from the release builds
# Also enable thin LTO for some optimizations
#================== Lints ==================#
[workspace.lints.rust]
unsafe_code = "deny"
unused_unsafe = "deny"
unsafe_op_in_unsafe_fn = "deny"
unused_crate_dependencies = "deny"
unused_import_braces = "deny"
unused_lifetimes = "deny"
keyword_idents_2018 = "deny"
keyword_idents_2024 = "deny"
missing_abi = "deny"
future_incompatible = { level = "deny", priority = -1 }

[workspace.lints.clippy]
borrow_as_ptr = "deny"
case_sensitive_file_extension_comparisons = "deny"
cast_lossless = "deny"
cast_ptr_alignment = "deny"
match_bool = "deny"
mut_mut = "deny"
wildcard_dependencies = "deny"
redundant_type_annotations = "deny"
infinite_loop = "deny"

#================= Profile =================#
[profile.release]
strip = "debuginfo"
lto = "thin"
opt-level = "z"
lto = true
strip = "none"
codegen-units = 1
opt-level = 3

# A little bit of a speedup
[profile.dev]
lto = false
opt-level = 1
split-debuginfo = "unpacked"

#=============== Dependencies ==============#
[workspace.dependencies]
# Workspace members
ferrumc-core = { path = "src/core" }
ferrumc-ecs = { path = "src/ecs" }
ferrumc-events = { path = "src/events" }
ferrumc-net = { path = "src/net" }
ferrumc-net-encryption = { path = "src/net/encryption" }
ferrumc-net-packets = { path = "src/net/packets" }
ferrumc-plugins = { path = "src/plugins" }
ferrumc-storage = { path = "src/storage" }
ferrumc-utils = { path = "src/utils" }
ferrumc-world = { path = "src/world" }

# Asynchronous
tokio = { version = "1.40.0", features = ["full"] }

# Logging
tracing = "0.1.40"

# Concurrency/Parallelism
rayon = "1.10.0"
crossbeam = "0.8.4"

# Network


# Cryptography
rsa = "0.9.6"

# Encoding/Serialization
fastnbt = "2.5.0"
3 changes: 0 additions & 3 deletions crates/README.MD

This file was deleted.

18 changes: 0 additions & 18 deletions crates/bin/Cargo.toml

This file was deleted.

2 changes: 0 additions & 2 deletions crates/bin/src/lib.rs

This file was deleted.

6 changes: 0 additions & 6 deletions crates/bin/src/main.rs

This file was deleted.

6 changes: 0 additions & 6 deletions crates/lib/dummy_lib/Cargo.toml

This file was deleted.

1 change: 0 additions & 1 deletion crates/lib/dummy_lib/README.MD

This file was deleted.

17 changes: 0 additions & 17 deletions crates/lib/dummy_lib/src/lib.rs

This file was deleted.

0 comments on commit b2e6da6

Please sign in to comment.