Skip to content

Commit

Permalink
chore: initial project structure
Browse files Browse the repository at this point in the history
  • Loading branch information
m4tx committed Jul 5, 2024
1 parent a425c53 commit 30f469d
Show file tree
Hide file tree
Showing 13 changed files with 144 additions and 5 deletions.
30 changes: 25 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,28 @@
[package]
name = "flareon"
version = "0.1.0"
[workspace]
members = [
"flareon",
"flareon-admin",
"flareon-auth",
"flareon-macros ",
"flareon-orm",
# Examples
"examples/hello-world",
]
resolver = "2"

[workspace.package]
edition = "2021"
license = "MIT OR Apache-2.0"
description = "Modern web framework focused on speed and ease of use."

[dependencies]
[workspace.dependencies]
async-trait = "0.1.80"
axum = "0.7.5"
chrono = { version = "0.4.38", features = ["serde"] }
clap = { version = "4.5.8", features = ["derive", "env"] }
env_logger = "0.11.3"
itertools = "0.13.0"
log = "0.4.22"
serde = "1.0.203"
slug = "0.1.5"
tokio = { version = "1.38.0", features = ["macros", "rt-multi-thread"] }
tower = "0.4.13"
8 changes: 8 additions & 0 deletions examples/hello-world/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[package]
name = "example-hello-world"
version = "0.1.0"
publish = false
description = "Hello World - Flareon example."

[dependencies]
flareon = { path = "../../flareon" }
3 changes: 3 additions & 0 deletions examples/hello-world/src/main.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
fn main() {

}
8 changes: 8 additions & 0 deletions flareon-admin/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[package]
name = "flareon-admin"
version = "0.1.0"
edition.workspace = true
license.workspace = true
description = "Modern web framework focused on speed and ease of use - admin panel."

[dependencies]
14 changes: 14 additions & 0 deletions flareon-admin/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);
}
}
8 changes: 8 additions & 0 deletions flareon-auth/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[package]
name = "flareon-auth"
version = "0.1.0"
edition.workspace = true
license.workspace = true
description = "Modern web framework focused on speed and ease of use - authentication."

[dependencies]
File renamed without changes.
16 changes: 16 additions & 0 deletions flareon-macros/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[package]
name = "flareon-macros"
version = "0.1.0"
edition.workspace = true
license.workspace = true
description = "Modern web framework focused on speed and ease of use - macros."

[lib]
proc-macro = true

[dependencies]
proc-macro2 = "1.0.86"
quote = "1.0.36"
syn = { version = "2.0.68", features = [
"full",
] }
Empty file added flareon-macros/src/lib.rs
Empty file.
23 changes: 23 additions & 0 deletions flareon-orm/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
[package]
name = "flareon-orm"
version = "0.1.0"
edition.workspace = true
license.workspace = true
description = "Modern web framework focused on speed and ease of use - ORM."

[dependencies]
chrono = { version = "0.4", default-features = false, features = ["clock"] }
time = { version = "0.3.36", features = ["macros"] }
uuid = { version = "1", features = ["serde", "v4"] }
serde_json = "1"
async-std = { version = "1.8", features = ["attributes"] }
sea-query = "0.31.0-rc.8"
sqlx = "0.7.4"
sea-query-binder = { version = "0.6.0-rc.4", features = [
"sqlx-sqlite",
"with-chrono",
"with-json",
"with-uuid",
"with-time",
"runtime-async-std-native-tls",
] }
14 changes: 14 additions & 0 deletions flareon-orm/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);
}
}
11 changes: 11 additions & 0 deletions flareon/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[package]
name = "flareon"
version = "0.1.0"
edition.workspace = true
license.workspace = true
description = "Modern web framework focused on speed and ease of use."

[dependencies]
axum.workspace = true
tokio.workspace = true
tower.workspace = true
14 changes: 14 additions & 0 deletions flareon/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 30f469d

Please sign in to comment.