This commit is contained in:
Verox001 2025-05-03 23:41:57 +02:00
commit 0b12eb7384
7 changed files with 54 additions and 0 deletions

12
.gitignore vendored Normal file
View File

@ -0,0 +1,12 @@
/target
**/target
/Cargo.lock
.vscode/
*.code-workspace
.idea/
.DS_Store
*.swp
*.swo
*~

5
Cargo.toml Normal file
View File

@ -0,0 +1,5 @@
[workspace]
members = [
"solar_engine",
"simulator"
]

7
simulator/Cargo.toml Normal file
View File

@ -0,0 +1,7 @@
[package]
name = "simulator"
version = "0.1.0"
edition = "2021"
[dependencies]
solar_engine = { path = "../solar_engine" }

3
simulator/src/main.rs Normal file
View File

@ -0,0 +1,3 @@
fn main() {
println!("Hello, world!");
}

7
solar_engine/Cargo.lock generated Normal file
View File

@ -0,0 +1,7 @@
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
version = 4
[[package]]
name = "solar_engine"
version = "0.1.0"

6
solar_engine/Cargo.toml Normal file
View File

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

14
solar_engine/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);
}
}