workspace setup
This commit is contained in:
parent
5c5334c543
commit
7a867a14d2
|
@ -0,0 +1,11 @@
|
||||||
|
# This file is automatically @generated by Cargo.
|
||||||
|
# It is not intended for manual editing.
|
||||||
|
version = 3
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "c-bindings"
|
||||||
|
version = "0.1.0"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "rs-basic"
|
||||||
|
version = "0.1.0"
|
19
Cargo.toml
19
Cargo.toml
|
@ -1,8 +1,19 @@
|
||||||
|
[workspace]
|
||||||
|
publish = false
|
||||||
|
members = [
|
||||||
|
".",
|
||||||
|
"members/c-bindings"
|
||||||
|
]
|
||||||
|
default-members = [
|
||||||
|
".",
|
||||||
|
"members/c-bindings"
|
||||||
|
]
|
||||||
|
|
||||||
[package]
|
[package]
|
||||||
name = "rs-basic"
|
name = "rs-basic"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
authors = ["Christoph J. Scherr <softwar@cscherr.de>"]
|
||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
publish = false
|
||||||
|
autobins = true
|
||||||
[dependencies]
|
default-run = "rs-basic"
|
||||||
|
|
|
@ -0,0 +1,9 @@
|
||||||
|
# Rust basics
|
||||||
|
|
||||||
|
This repository aims to contain basics for the rust language.
|
||||||
|
|
||||||
|
## Structure
|
||||||
|
|
||||||
|
- [`modules`] contains complete small `cargo` projects
|
||||||
|
- [`src/bin`] contains binaries that are too small to justify a complete
|
||||||
|
directory.
|
|
@ -0,0 +1,8 @@
|
||||||
|
[package]
|
||||||
|
name = "c-bindings"
|
||||||
|
version = "0.1.0"
|
||||||
|
edition = "2021"
|
||||||
|
|
||||||
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
|
||||||
|
[dependencies]
|
|
@ -0,0 +1,3 @@
|
||||||
|
fn main() {
|
||||||
|
println!("Hello, world!");
|
||||||
|
}
|
10
src/main.rs
10
src/main.rs
|
@ -1,3 +1,11 @@
|
||||||
fn main() {
|
fn main() {
|
||||||
println!("Hello, world!");
|
println!(
|
||||||
|
"This is the default executable! It does not do much, use another executable.
|
||||||
|
|
||||||
|
Select your target like this:
|
||||||
|
`cargo run --bin $TARGET`
|
||||||
|
|
||||||
|
To see a list of all runnable binaries, you can use the following command.
|
||||||
|
`cargo run --bin`
|
||||||
|
");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue