chore: init project

dev
Jef Roosens 2023-05-11 08:56:26 +02:00
parent b89a0a4192
commit 02d5446e3e
Signed by: Jef Roosens
GPG Key ID: B75D4F293C7052DB
5 changed files with 1128 additions and 0 deletions

26
.gitignore vendored 100644
View File

@ -0,0 +1,26 @@
# Created by https://www.toptal.com/developers/gitignore/api/rust,rust-analyzer
# Edit at https://www.toptal.com/developers/gitignore?templates=rust,rust-analyzer
### Rust ###
# Generated by Cargo
# will have compiled files and executables
debug/
target/
# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html
# Cargo.lock
# These are backup files generated by rustfmt
**/*.rs.bk
# MSVC Windows builds of rustc generate these, which store debugging information
*.pdb
### rust-analyzer ###
# Can be generated by other build systems other than cargo (ex: bazelbuild/rust_rules)
rust-project.json
# End of https://www.toptal.com/developers/gitignore/api/rust,rust-analyzer

1073
Cargo.lock generated 100644

File diff suppressed because it is too large Load Diff

5
Cargo.toml 100644
View File

@ -0,0 +1,5 @@
[workspace]
members = [
"affluences-api",
]

View File

@ -0,0 +1,10 @@
[package]
name = "affluences-api"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
reqwest = { version = "0.11.17", features = ["json"] }
serde = { version = "1.0.163", features = ["derive"] }

View File

@ -0,0 +1,14 @@
pub fn add(left: usize, right: usize) -> usize {
left + right
}
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn it_works() {
let result = add(2, 2);
assert_eq!(result, 4);
}
}