Skip to content

Commit 56cdf17

Browse files
added new default cargo project
1 parent 6c2556a commit 56cdf17

5 files changed

Lines changed: 27 additions & 1 deletion

File tree

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,5 @@ Cargo.lock
66
cobertura.xml
77
tarpaulin-report.html
88
*~
9+
**/.DS_Store
10+
**/.idea

Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ members = [
99
"stacks-doctor",
1010
"test-utils",
1111
"test-vectors",
12-
"yarpc"]
12+
"yarpc",
13+
"first-build"]
1314

1415
[workspace.dependencies]
1516
bs58 = "0.4"

first-build/Cargo.toml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
[package]
2+
name = "first-build"
3+
version = "0.1.0"
4+
edition = "2021"
5+
6+
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
7+
8+
[dependencies]

first-build/src/helper.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
pub fn public_available() {
2+
println!("This function is public");
3+
}
4+
5+
pub fn public_sum(a: i32, b: i32) -> i32 {
6+
a + b
7+
}

first-build/src/main.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
mod helper;
2+
3+
fn main() {
4+
helper::public_available();
5+
println!("Sum of 1 and 2 is {}", helper::public_sum(1, 2));
6+
7+
println!("Hello, world!");
8+
}

0 commit comments

Comments
 (0)