workspace setup

This commit is contained in:
Christoph J. Scherr 2023-09-12 17:01:33 +02:00
parent 5c5334c543
commit 7a867a14d2
6 changed files with 55 additions and 5 deletions

11
Cargo.lock generated Normal file
View File

@ -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"

View File

@ -1,8 +1,19 @@
[workspace]
publish = false
members = [
".",
"members/c-bindings"
]
default-members = [
".",
"members/c-bindings"
]
[package]
name = "rs-basic"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
authors = ["Christoph J. Scherr <softwar@cscherr.de>"]
publish = false
autobins = true
default-run = "rs-basic"

View File

@ -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.

View File

@ -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]

View File

@ -0,0 +1,3 @@
fn main() {
println!("Hello, world!");
}

View File

@ -1,3 +1,11 @@
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`
");
}