Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ target/
# MSVC Windows builds of rustc generate these, which store debugging information
*.pdb

Cargo.lock
**/Cargo.lock
# RustRover
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
Expand Down
5 changes: 5 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[workspace]
resolver ="2"
members =["crates/hello"]
members =["crates/hello", "crates/worldlib"]
1 change: 1 addition & 0 deletions crates/hello/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ license = "MIT"
[dependencies]
reqwest = "0.12.15"
tokio = { version = "1.44.2", features = ["full"] }
worldlib ={path="../worldlib"}
1 change: 1 addition & 0 deletions crates/hello/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ async fn main() -> Result<(), Box<dyn Error>> {

println!("body:{}", body);
println!("hello world");
worldlib::print_sth("this is from hello".to_string());
Ok(())
}
#[allow(dead_code)]
Expand Down
6 changes: 6 additions & 0 deletions crates/worldlib/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[package]
name = "worldlib"
version = "0.1.0"
edition = "2024"
license = "MIT"
[dependencies]
3 changes: 3 additions & 0 deletions crates/worldlib/src/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
pub fn print_sth(s: String) {
println!("{}", s);
}