From e210e25f55782f8a414557330d2de2af9e8da73f Mon Sep 17 00:00:00 2001 From: wyang5 <61440018+wyang5@users.noreply.github.com> Date: Thu, 8 Feb 2024 17:50:16 -0600 Subject: [PATCH] added basic project config files and placeholder module --- .github/workflows/ci.yml | 29 +++++++++++++++++++++++++++++ .gitignore | 4 ++++ Cargo.toml | 10 ++++++++++ src/lib.rs | 18 ++++++++++++++++++ 4 files changed, 61 insertions(+) create mode 100644 .github/workflows/ci.yml create mode 100644 .gitignore create mode 100644 Cargo.toml create mode 100644 src/lib.rs diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..830d0cc --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,29 @@ +on: + pull_request: + branches: + - main + push: + branches: + - main + +env: + RUST_BACKTRACE: 1 + +jobs: + basic-checks: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - run: cargo check + - run: > + rustup component add rustfmt && + cargo fmt --all --check + - run: > + rustup component add clippy && + cargo clippy --all-targets --all-features -- -D warnings + run-tests-with-miri: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - run: rustup +nightly component add miri + - run: cargo +nightly miri test diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..301e1dd --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +/.idea +/target + +Cargo.lock diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 0000000..f5b5d5d --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,10 @@ +[package] +name = "aarc" +version = "0.0.1" +edition = "2021" +description = "Atomically updatable variants of Arc and Weak for lock-free concurrency." +homepage = "https://github.com/aarc-rs/aarc" +repository = "https://github.com/aarc-rs/aarc" +license = "MIT" +keywords = ["atomic", "arc", "thread-safe", "sync", "lock-free"] +categories = ["concurrency", "memory-management", "data-structures", "algorithms"] diff --git a/src/lib.rs b/src/lib.rs new file mode 100644 index 0000000..e75b2b8 --- /dev/null +++ b/src/lib.rs @@ -0,0 +1,18 @@ +pub mod example1 { + /// The quick brown fox jumps over the lazy dog. + /// # Examples: + /// ``` + /// assert!(true); + /// ``` + pub fn say_hello() { + println!("hello world!"); + } +} + +#[cfg(test)] +mod tests { + #[test] + fn test1() { + assert_eq!(1, 1); + } +}