diff --git a/.github/workflows/check_and_lint.yaml b/.github/workflows/check_and_lint.yaml
new file mode 100644
index 0000000..7794a8b
--- /dev/null
+++ b/.github/workflows/check_and_lint.yaml
@@ -0,0 +1,50 @@
+on: [push]
+
+name: Check, Lint, Build
+
+env:
+ CARGO_TERM_COLOR: always
+
+jobs:
+ check-lint-build-stable:
+ name: Check, Lint, Build (stable)
+ runs-on: ubuntu-latest
+ timeout-minutes: 20
+ # env:
+ # RUSTFLAGS: -D warnings
+ steps:
+ - uses: actions/checkout@v2
+ - name: Install latest stable toolchain
+ uses: actions-rs/toolchain@v1
+ with:
+ profile: minimal
+ toolchain: stable
+ components: rustfmt, clippy
+ override: true
+ target: x86_64-pc-windows-gnu
+
+ - name: Rust Cache
+ uses: Swatinem/rust-cache@v2.5.1
+
+ - name: Rustfmt
+ uses: actions-rs/cargo@v1
+ with:
+ command: fmt
+ args: --all -- --check
+
+ - name: Cargo check
+ uses: actions-rs/cargo@v1
+ with:
+ command: check
+
+ - name: Clippy
+ uses: actions-rs/cargo@v1
+ with:
+ command: clippy
+ args: --all-targets --all-features
+
+ - name: Build
+ uses: actions-rs/cargo@v1
+ with:
+ command: build
+ args: --release
\ No newline at end of file
diff --git a/.github/workflows/comment_coverage.yaml b/.github/workflows/comment_coverage.yaml
new file mode 100644
index 0000000..79c7446
--- /dev/null
+++ b/.github/workflows/comment_coverage.yaml
@@ -0,0 +1,116 @@
+# This workflow should enforce monotonically increasing comment coverage
+
+on: [pull_request]
+
+name: Comment Coverage
+
+#env:
+# CARGO_TERM_COLOR: always
+
+jobs:
+ check-lint-build-stable:
+ name: Comment Coverage (stable)
+ runs-on: ubuntu-latest
+ timeout-minutes: 20
+ steps:
+ - name: Install Protoc
+ uses: arduino/setup-protoc@v2
+
+ - name: Install latest stable toolchain
+ uses: actions-rs/toolchain@v1
+ with:
+ profile: minimal
+ toolchain: stable
+ components: rustfmt, clippy
+ override: true
+ target: x86_64-pc-windows-gnu
+
+ - name: Rust Cache
+ uses: Swatinem/rust-cache@v2.5.1
+
+ - name: Checkout PR branch
+ uses: actions/checkout@v2
+
+ - name: Missing docs warnings (PR)
+ id: missing_docs_warnings_pr
+ run: |
+ # use a random EOF, as per GitHub security recommendations
+ EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64)
+ WARNINGS=$(\
+ cargo -q clippy --message-format=short -- \
+ -Aclippy::all \
+ -Wclippy::missing_errors_doc \
+ -Wclippy::missing_panics_doc \
+ -Wclippy::missing_safety_doc \
+ -Wclippy::missing_docs_in_private_items \
+ -Wmissing_docs \
+ 2>&1)
+ echo "$WARNINGS"
+ AWKSTR='/warning: `.+` \(lib\) generated [0-9]+ warnings?/ { print $3 ": " $7 }'
+ WARNINGS=$(echo "$WARNINGS" | awk -F"[\` ]" "$AWKSTR" | sort)
+ echo "PR_WARNINGS<<$EOF" >> "$GITHUB_OUTPUT"
+ echo "$WARNINGS" >> "$GITHUB_OUTPUT"
+ echo "$EOF" >> "$GITHUB_OUTPUT"
+
+ - name: Checkout target branch
+ uses: actions/checkout@v2
+ with:
+ ref: ${{ github.base_ref }}
+
+ - name: Missing docs warnings (Target)
+ id: missing_docs_warnings_target
+ run: |
+ # use a random EOF, as per GitHub security recommendations
+ EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64)
+ WARNINGS=$(\
+ cargo -q clippy --message-format=short -- \
+ -Aclippy::all \
+ -Wclippy::missing_errors_doc \
+ -Wclippy::missing_panics_doc \
+ -Wclippy::missing_safety_doc \
+ -Wclippy::missing_docs_in_private_items \
+ -Wmissing_docs \
+ 2>&1)
+ echo "$WARNINGS"
+ AWKSTR='/warning: `.+` \(lib\) generated [0-9]+ warnings?/ { print $3 ": " $7 }'
+ WARNINGS=$(echo "$WARNINGS" | awk -F"[\` ]" "$AWKSTR" | sort)
+ echo "TARGET_WARNINGS<<$EOF" >> "$GITHUB_OUTPUT"
+ echo "$WARNINGS" >> "$GITHUB_OUTPUT"
+ echo "$EOF" >> "$GITHUB_OUTPUT"
+
+ - name: Compare comment coverage
+ run: |
+ PR_WARNINGS="${{steps.missing_docs_warnings_pr.outputs.PR_WARNINGS}}"
+ TARGET_WARNINGS="${{ steps.missing_docs_warnings_target.outputs.TARGET_WARNINGS }}"
+ readarray -t missing_docs_warnings_pr_arr <<< "$PR_WARNINGS"
+ readarray -t missing_docs_warnings_target_arr <<< "$TARGET_WARNINGS"
+ for pr_warnings_line in "${missing_docs_warnings_pr_arr[@]}"
+ do
+ # Extract the libname and number of warnings from the line
+ IFS=': ' read -r libname nwarnings_pr <<< "$pr_warnings_line"
+ # Look for the libname in the target warnings
+ target_warning_line=""
+ for target_warnings_line in "${missing_docs_warnings_target_arr[@]}"
+ do
+ if [[ $target_warnings_line == "$libname:"* ]]; then
+ target_warning_line=$target_warnings_line
+ break
+ fi
+ done
+
+ if [ -z "$target_warning_line" ]
+ then
+ echo "New warnings found for \`${libname}\`"
+ exit 1
+ fi
+
+ # Find the number of warnings for the target branch
+ IFS=': ' read -r _ nwarnings_target <<< "$target_warning_line"
+
+ # Compare the values
+ if [ "$nwarnings_target" -gt "$nwarnings_pr" ]
+ then
+ echo "Too many warnings for \`${libname}\` (${nwarnings_pr}): must be less than $nwarnings_target"
+ exit 1
+ fi
+ done
\ No newline at end of file
diff --git a/rustfmt.toml b/rustfmt.toml
index 3a26366..5878aee 100644
--- a/rustfmt.toml
+++ b/rustfmt.toml
@@ -1 +1,7 @@
edition = "2021"
+max_width = 80
+
+# unstable features
+# unstable_features = true
+# reorder_impl_items = true
+# group_imports = "StdExternalCrate"
\ No newline at end of file
diff --git a/src/archive.rs b/src/archive.rs
index 297305b..7e2ad79 100644
--- a/src/archive.rs
+++ b/src/archive.rs
@@ -31,13 +31,21 @@ impl<
})
}
- pub fn get_header(&self, txn: &RoTxn, height: u32) -> Result