Skip to content

Commit

Permalink
added new default cargo project
Browse files Browse the repository at this point in the history
  • Loading branch information
BowTiedDeployer committed May 24, 2023
1 parent 6c2556a commit 56cdf17
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@ Cargo.lock
cobertura.xml
tarpaulin-report.html
*~
**/.DS_Store
**/.idea
3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ members = [
"stacks-doctor",
"test-utils",
"test-vectors",
"yarpc"]
"yarpc",
"first-build"]

[workspace.dependencies]
bs58 = "0.4"
Expand Down
8 changes: 8 additions & 0 deletions first-build/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[package]
name = "first-build"
version = "0.1.0"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
7 changes: 7 additions & 0 deletions first-build/src/helper.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
pub fn public_available() {
println!("This function is public");
}

pub fn public_sum(a: i32, b: i32) -> i32 {
a + b
}
8 changes: 8 additions & 0 deletions first-build/src/main.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
mod helper;

fn main() {
helper::public_available();
println!("Sum of 1 and 2 is {}", helper::public_sum(1, 2));

println!("Hello, world!");
}

0 comments on commit 56cdf17

Please # to comment.