Add basic rust packages

This commit is contained in:
LDprg 2023-07-08 13:12:40 +02:00
parent f575b1e1f5
commit 502f4b6a2b
6 changed files with 44 additions and 0 deletions

8
winapps-cli/Cargo.toml Normal file
View File

@ -0,0 +1,8 @@
[package]
name = "winapps-cli"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]

3
winapps-cli/src/main.rs Normal file
View File

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

8
winapps-gui/Cargo.toml Normal file
View File

@ -0,0 +1,8 @@
[package]
name = "winapps-gui"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]

3
winapps-gui/src/main.rs Normal file
View File

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

8
winapps/Cargo.toml Normal file
View File

@ -0,0 +1,8 @@
[package]
name = "winapps"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]

14
winapps/src/lib.rs Normal file
View File

@ -0,0 +1,14 @@
pub fn add(left: usize, right: usize) -> usize {
left + right
}
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn it_works() {
let result = add(2, 2);
assert_eq!(result, 4);
}
}