Skip to content

Commit d98dcc1

Browse files
committed
Add Rust lib
1 parent 0f74132 commit d98dcc1

3 files changed

Lines changed: 13 additions & 3 deletions

File tree

Cargo.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,7 @@ edition = "2024"
88
[[bin]]
99
name = "notcc"
1010
path = "rust_src/main.rs"
11+
12+
[lib]
13+
name = "notcc"
14+
path = "rust_src/lib.rs"

rust_src/lib.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pub mod error;
2+
3+
pub fn driver() {
4+
println!("you did it!")
5+
}

rust_src/main.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
mod error;
21
//mod driver;
2+
use notcc;
33

4-
fn main() -> Result<(), error::Error> {
5-
return error::fail("Bad news bro!");
4+
fn main() -> Result<(), notcc::error::Error> {
5+
notcc::driver();
6+
return notcc::error::fail("Bad news bro!");
67
}

0 commit comments

Comments
 (0)