I am trying a build a library using the CLion IDE with Rust plugin installed. After a successful build, the library is not generated in the target/debug directory.
This is my project structure:
src/lib.rs
pub mod Math;
src/Math.rs
pub struct Arithmetic {
x: i32,
y: i32,
}
impl Arithmetic {
pub fn new(&mut self, x: i32, y: i32) {
self.x = x;
self.y = y;
}
pub fn add() -> i32 {
2 + 3
}
pub fn sub() -> i32 {
2 - 3
}
pub fn mul() -> i32 {
2 * 3
}
pub fn div() -> i32 {
2 / 3
}
}
Cargo.toml
[package]
name = "Test_Lib"
version = "0.1.0"
edition = "2018"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
What am I doing wrong?