Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Asurar0 committed Sep 16, 2024
1 parent b2e6da6 commit 034692c
Show file tree
Hide file tree
Showing 25 changed files with 268 additions and 0 deletions.
Binary file added .etc/nbt_lib_validation.nbt
Binary file not shown.
40 changes: 40 additions & 0 deletions src/README.MD
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# FerrumC source code

Welcome to FerrumC project source code.

The FerrumC project source code is organized as follows:

## Code source layout

FerrumC will define the following primary crates inside its source code:
- `ferrumc-core`
- `ferrumc-ecs`
- `ferrumc-events`
- `ferrumc-net`
- `ferrumc-storage`
- `ferrumc-utils`
- `ferrumc-world`
- `ferrumc-plugins`

Each crate may contain subcrates within its directory to implement essential components. For example:
```md
- core/ # ferrumc-core
- net/ # ferrumc-net
- encode # ferrumc-net-encode
```

## Dependencies

Dependencies are defined in the workspace Cargo.toml file and imported into each crate using the following syntax:
```toml
crate = { workspace = true }
```

Workspace members dependencies are defined as follows:
```toml
member = { workspace = true }
```

## Tests

Tests are located within their respective crates and do not have a separate tests/ folder.
13 changes: 13 additions & 0 deletions src/bin/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[package]
name = "ferrumc"
description = "A high-performance Minecraft server implementation, crafted in Rust for unparalleled speed and efficiency."
version = "0.1.0"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]

[[bin]]
name = "ferrumc"
path = "src/main.rs"
2 changes: 2 additions & 0 deletions src/bin/src/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// Security
#![forbid(unsafe_code)]
6 changes: 6 additions & 0 deletions src/bin/src/main.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// Security
#![forbid(unsafe_code)]

fn main() {
println!("Hello, world!");
}
7 changes: 7 additions & 0 deletions src/core/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[package]
name = "ferrumc-core"
description = "This crate defines all the primitives, traits and logics used in FerrumC codebase."
version = "0.1.0"
edition = "2021"

[dependencies]
14 changes: 14 additions & 0 deletions src/core/src/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
pub fn add(left: u64, right: u64) -> u64 {
left + right
}

#[cfg(test)]
mod tests {
use super::*;

#[test]
fn it_works() {
let result = add(2, 2);
assert_eq!(result, 4);
}
}
7 changes: 7 additions & 0 deletions src/ecs/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[package]
name = "ferrumc-ecs"
description = "FerrumC specific ECS (Entity Component System) implementation."
version = "0.1.0"
edition = "2021"

[dependencies]
14 changes: 14 additions & 0 deletions src/ecs/src/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
pub fn add(left: u64, right: u64) -> u64 {
left + right
}

#[cfg(test)]
mod tests {
use super::*;

#[test]
fn it_works() {
let result = add(2, 2);
assert_eq!(result, 4);
}
}
6 changes: 6 additions & 0 deletions src/events/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[package]
name = "events"
version = "0.1.0"
edition = "2021"

[dependencies]
14 changes: 14 additions & 0 deletions src/events/src/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
pub fn add(left: u64, right: u64) -> u64 {
left + right
}

#[cfg(test)]
mod tests {
use super::*;

#[test]
fn it_works() {
let result = add(2, 2);
assert_eq!(result, 4);
}
}
7 changes: 7 additions & 0 deletions src/net/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[package]
name = "ferrumc-net"
description = "Defines and implements all network related functionalities of FerrumC"
version = "0.1.0"
edition = "2021"

[dependencies]
6 changes: 6 additions & 0 deletions src/net/encryption/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[package]
name = "ferrumc-net-encryption"
version = "0.1.0"
edition = "2021"

[dependencies]
14 changes: 14 additions & 0 deletions src/net/encryption/src/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
pub fn add(left: u64, right: u64) -> u64 {
left + right
}

#[cfg(test)]
mod tests {
use super::*;

#[test]
fn it_works() {
let result = add(2, 2);
assert_eq!(result, 4);
}
}
6 changes: 6 additions & 0 deletions src/net/packets/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[package]
name = "ferrumc-net-packets"
version = "0.1.0"
edition = "2021"

[dependencies]
14 changes: 14 additions & 0 deletions src/net/packets/src/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
pub fn add(left: u64, right: u64) -> u64 {
left + right
}

#[cfg(test)]
mod tests {
use super::*;

#[test]
fn it_works() {
let result = add(2, 2);
assert_eq!(result, 4);
}
}
14 changes: 14 additions & 0 deletions src/net/src/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
pub fn add(left: u64, right: u64) -> u64 {
left + right
}

#[cfg(test)]
mod tests {
use super::*;

#[test]
fn it_works() {
let result = add(2, 2);
assert_eq!(result, 4);
}
}
7 changes: 7 additions & 0 deletions src/plugins/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[package]
name = "ferrumc-plugins"
description = "FerrumC WebAssembly plugin integration."
version = "0.1.0"
edition = "2021"

[dependencies]
14 changes: 14 additions & 0 deletions src/plugins/src/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
pub fn add(left: u64, right: u64) -> u64 {
left + right
}

#[cfg(test)]
mod tests {
use super::*;

#[test]
fn it_works() {
let result = add(2, 2);
assert_eq!(result, 4);
}
}
7 changes: 7 additions & 0 deletions src/storage/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[package]
name = "ferrumc-storage"
description = "Implements storage capabilities of FerrumC for world persistence and on-disk resource parsing."
version = "0.1.0"
edition = "2021"

[dependencies]
14 changes: 14 additions & 0 deletions src/storage/src/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
pub fn add(left: u64, right: u64) -> u64 {
left + right
}

#[cfg(test)]
mod tests {
use super::*;

#[test]
fn it_works() {
let result = add(2, 2);
assert_eq!(result, 4);
}
}
7 changes: 7 additions & 0 deletions src/utils/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[package]
name = "ferrumc-utils"
description = "Collection of utilities for use within FerrumC codebase."
version = "0.1.0"
edition = "2021"

[dependencies]
14 changes: 14 additions & 0 deletions src/utils/src/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
pub fn add(left: u64, right: u64) -> u64 {
left + right
}

#[cfg(test)]
mod tests {
use super::*;

#[test]
fn it_works() {
let result = add(2, 2);
assert_eq!(result, 4);
}
}
7 changes: 7 additions & 0 deletions src/world/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[package]
name = "ferrumc-world"
description = "FerrumC specific world definition and implementation of a Minecraft World and related logic."
version = "0.1.0"
edition = "2021"

[dependencies]
14 changes: 14 additions & 0 deletions src/world/src/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
pub fn add(left: u64, right: u64) -> u64 {
left + right
}

#[cfg(test)]
mod tests {
use super::*;

#[test]
fn it_works() {
let result = add(2, 2);
assert_eq!(result, 4);
}
}

0 comments on commit 034692c

Please sign in to comment.