feat: init with rust lib and bin crate
This commit is contained in:
commit
ca266531a9
21 changed files with 990 additions and 0 deletions
11
templates/default/rust/app/Cargo.toml
Normal file
11
templates/default/rust/app/Cargo.toml
Normal file
|
@ -0,0 +1,11 @@
|
|||
[package]
|
||||
name = "app"
|
||||
edition = "2021"
|
||||
version.workspace = true
|
||||
|
||||
[dependencies]
|
||||
lib = { path = "../lib" }
|
||||
|
||||
anyhow = { workspace = true }
|
||||
log = { workspace = true }
|
||||
env_logger = { workspace = true }
|
6
templates/default/rust/app/src/main.rs
Normal file
6
templates/default/rust/app/src/main.rs
Normal file
|
@ -0,0 +1,6 @@
|
|||
fn main() {
|
||||
let (a, b) = (1, 1);
|
||||
let r = lib::add(a, b);
|
||||
|
||||
println!("{a} + {b} = {r}");
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue