diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..4d2d626 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,56 @@ +on: ["push", "pull_request"] + +jobs: + build-and-test-linux: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: dtolnay/rust-toolchain@stable + with: + toolchain: stable + targets: wasm32-unknown-unknown + components: rustfmt, clippy + + - name: Run cargo test + run: cargo test --all-features + + - name: Run cargo build + run: cargo build --all + + - name: Run cargo fmt + run: cargo fmt --all -- --check + + - name: Run cargo clippy + run: cargo clippy --all -- -D warnings + + - name: Build for wasm + run: cargo build --target wasm32-unknown-unknown + + - name: Build release + run: cargo build --release + + build-and-test-macos: + runs-on: macos-latest + steps: + - uses: actions/checkout@v4 + + - uses: dtolnay/rust-toolchain@stable + with: + toolchain: stable + components: rustfmt, clippy + + - name: Run cargo test + run: cargo test --all-features + + - name: Run cargo build + run: cargo build --all + + - name: Run cargo fmt + run: cargo fmt --all -- --check + + - name: Run cargo clippy + run: cargo clippy --all -- -D warnings + + - name: Build release + run: cargo build --release \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ad2f0ff --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +/target +Cargo.lock +.DS_Store \ No newline at end of file diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 0000000..8d59440 --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,8 @@ +[package] +name = "pumice" +version = "0.1.0" +edition = "2021" + +[dependencies] +ark-ff = "0.4.2" +ark-poly = "0.4.2" diff --git a/src/lib.rs b/src/lib.rs new file mode 100644 index 0000000..b93cf3f --- /dev/null +++ b/src/lib.rs @@ -0,0 +1,14 @@ +pub fn add(left: u64, right: u64) -> u64 { + left + right +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn it_works() { + let result = add(2, 2); + assert_eq!(result, 4); + } +}