Add kxos and kxos-std crate

This commit is contained in:
Tate, Hongliang Tian 2022-08-08 12:44:53 -07:00
parent 16976d1fcf
commit b2ad9dc05e
4 changed files with 33 additions and 0 deletions

8
src/kxos-std/Cargo.toml Normal file
View File

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

14
src/kxos-std/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);
}
}

8
src/kxos/Cargo.toml Normal file
View File

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

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

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