Initial commit

This commit is contained in:
David Skrundz 2023-12-22 23:21:13 -07:00
commit 62f0fa71cb
Signed by: DavidSkrundz
GPG Key ID: D7006AAB6214A600
11 changed files with 119 additions and 0 deletions

9
.gitignore vendored Normal file
View File

@ -0,0 +1,9 @@
# OS Files
*~
._*
.DS_Store
# Rust
/target
# Rust Libraries Only
/Cargo.lock

2
.rustfmt.toml Normal file
View File

@ -0,0 +1,2 @@
hard_tabs = true
wrap_comments = true

10
.vscode/extensions.json vendored Normal file
View File

@ -0,0 +1,10 @@
{
"recommendations": [
"vadimcn.vscode-lldb",
"barbosshack.crates-io",
"usernamehw.errorlens",
"tamasfe.even-better-toml",
"rust-lang.rust-analyzer",
"karunamurti.tera", // Tera templates
]
}

32
.vscode/settings.json vendored Normal file
View File

@ -0,0 +1,32 @@
{
// VSCode
"editor.detectIndentation": false,
"editor.insertSpaces": false,
"editor.tabSize": 4,
"files.exclude": {
"**/target": true,
"**/Cargo.lock": true,
},
"files.insertFinalNewline": true,
"files.trimFinalNewlines": true,
"files.trimTrailingWhitespace": true,
"files.watcherExclude": {
"**/.git/**": true,
"**/target/**": true,
},
// Extensions
"crates.listPreReleases": true,
"evenBetterToml.formatter.alignComments": true,
"evenBetterToml.formatter.alignEntries": false,
"evenBetterToml.formatter.allowedBlankLines": 1,
"evenBetterToml.formatter.arrayAutoExpand": true,
"evenBetterToml.formatter.arrayTrailingComma": true,
"evenBetterToml.formatter.columnWidth": 80,
"evenBetterToml.formatter.reorderKeys": true,
"evenBetterToml.formatter.trailingNewline": true,
"rust-analyzer.imports.granularity.enforce": true,
"rust-analyzer.imports.granularity.group": "module",
"rust-analyzer.imports.group.enable": true,
"rust-analyzer.imports.merge.glob": false,
"rust-analyzer.imports.preferNoStd": true,
}

6
CONTRIBUTING.md Normal file
View File

@ -0,0 +1,6 @@
How to Contribute
=================
We'd love to accept your patches and contributions to this project.
We just need you to follow the Contributor License Agreement outlined
in the latest v0.0.x of https://github.com/Skrunix/license

20
Cargo.toml Normal file
View File

@ -0,0 +1,20 @@
[workspace]
members = ["rust"]
resolver = "2"
[workspace.package]
authors = []
edition = "2021"
license-file = "LICENSE.md"
rust-version = "1.64.0"
[workspace.lints.rust]
unsafe_code = "forbid"
[profile.release]
lto = "fat"
opt-level = 3
strip = "debuginfo"
[workspace.dependencies]
# crate = { version = "^0", default-features = false }

7
LICENSE.md Normal file
View File

@ -0,0 +1,7 @@
Skrunix Software License
========================
Permission to use, copy, modify, and/or distribute this software is
outlined in the latest v0.0.x of https://github.com/Skrunix/license
THE SOFTWARE IS PROVIDED "AS IS"

3
README.md Normal file
View File

@ -0,0 +1,3 @@
# Workspace Template
Make sure not to keep git history when copying this template

2
rust-toolchain.toml Normal file
View File

@ -0,0 +1,2 @@
[toolchain]
channel = "stable"

14
rust/Cargo.toml Normal file
View File

@ -0,0 +1,14 @@
[package]
name = "rust"
version = "0.0.0"
authors.workspace = true
edition.workspace = true
license-file.workspace = true
rust-version.workspace = true
[lints]
workspace = true
[dependencies]
# crate = { workspace = true }

14
rust/src/lib.rs Normal file
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);
}
}