Skip to content

Commit

Permalink
bootstrap rust part
Browse files Browse the repository at this point in the history
  • Loading branch information
jreidinger committed Nov 13, 2024
1 parent 65c1031 commit bdc8bdb
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 0 deletions.
9 changes: 9 additions & 0 deletions rust/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[workspace]
members = [
"zypp-agama",
"zypp-agama-example",
]
resolver = "2"

[workspace.package]
edition = "2021"
6 changes: 6 additions & 0 deletions rust/zypp-agama-example/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[package]
name = "zypp-agama-example"
version = "0.1.0"
edition = "2021"

[dependencies]
3 changes: 3 additions & 0 deletions rust/zypp-agama-example/src/main.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
fn main() {
println!("Hello, world!");
}
6 changes: 6 additions & 0 deletions rust/zypp-agama/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[package]
name = "zypp-agama"
version = "0.1.0"
edition = "2021"

[dependencies]
14 changes: 14 additions & 0 deletions rust/zypp-agama/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 bdc8bdb

Please sign in to comment.