Skip to content

Commit e4cd1c8

Browse files
committed
Add struct
Signed-off-by: Klaus Ma <[email protected]>
1 parent e310e76 commit e4cd1c8

File tree

12 files changed

+95
-0
lines changed

12 files changed

+95
-0
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
target/

Cargo.lock

+19
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
[workspace]
2+
resolver = "2"
3+
members = [
4+
"libnim",
5+
"xpuctl",
6+
"smctl",
7+
"hcactl",
8+
]
9+
10+
[workspace.dependencies]

README.md

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Network Infrastructure Management
2+
3+
4+
## libnim
5+
6+
The lib for network infrastructure management.
7+
8+
## xpuctl
9+
10+
The command line to manage XPU.
11+
12+
## hcactl
13+
14+
The command line to manage HCA of host.
15+
16+
## smctl
17+
18+
The command line to manage subnet manager.

hcactl/Cargo.toml

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[package]
2+
name = "hcactl"
3+
version = "0.1.0"
4+
edition = "2021"
5+
6+
[dependencies]

hcactl/src/main.rs

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
fn main() {
2+
println!("Hello, world!");
3+
}

libnim/Cargo.toml

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[package]
2+
name = "libnim"
3+
version = "0.1.0"
4+
edition = "2021"
5+
6+
[dependencies]

libnim/src/lib.rs

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
pub fn add(left: u64, right: u64) -> u64 {
2+
left + right
3+
}
4+
5+
#[cfg(test)]
6+
mod tests {
7+
use super::*;
8+
9+
#[test]
10+
fn it_works() {
11+
let result = add(2, 2);
12+
assert_eq!(result, 4);
13+
}
14+
}

smctl/Cargo.toml

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[package]
2+
name = "smctl"
3+
version = "0.1.0"
4+
edition = "2021"
5+
6+
[dependencies]

smctl/src/main.rs

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
fn main() {
2+
println!("Hello, world!");
3+
}

xpuctl/Cargo.toml

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[package]
2+
name = "xpuctl"
3+
version = "0.1.0"
4+
edition = "2021"
5+
6+
[dependencies]

xpuctl/src/main.rs

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
fn main() {
2+
println!("Hello, world!");
3+
}

0 commit comments

Comments
 (0)