initial structure

This commit is contained in:
Borodinov Ilya 2024-11-11 22:29:18 +03:00
parent 0ac38c3cbc
commit 83774a7ed5
Signed by: noth
GPG key ID: 75503B2EF596D1BD
9 changed files with 88 additions and 6 deletions

View file

@ -1,6 +1,8 @@
[package] [workspace]
name = "Cogs" members = [
version = "0.1.0" "crates/ast",
edition = "2021" "crates/codegen",
"crates/parser",
[dependencies] "integrations/axum"
]
resolver = "2"

6
crates/ast/Cargo.toml Normal file
View file

@ -0,0 +1,6 @@
[package]
name = "cogs_ast"
version = "0.1.0"
edition = "2021"
[dependencies]

14
crates/ast/src/lib.rs Normal file
View file

@ -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);
}
}

View file

@ -0,0 +1,6 @@
[package]
name = "cogs_codegen"
version = "0.1.0"
edition = "2021"
[dependencies]

14
crates/codegen/src/lib.rs Normal file
View file

@ -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
crates/parser/Cargo.toml Normal file
View file

@ -0,0 +1,6 @@
[package]
name = "cogs_parser"
version = "0.1.0"
edition = "2021"
[dependencies]

14
crates/parser/src/lib.rs Normal file
View file

@ -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);
}
}

View file

@ -0,0 +1,6 @@
[package]
name = "cogs_axum"
version = "0.1.0"
edition = "2021"
[dependencies]

View file

@ -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);
}
}