Skip to content

Commit

Permalink
First code commit
Browse files Browse the repository at this point in the history
  • Loading branch information
mantono committed Dec 6, 2023
1 parent 3ab7198 commit 7048d11
Show file tree
Hide file tree
Showing 9 changed files with 606 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: 'bug'
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behaviour;
- What flags where used when executing the program
- Under which conditions does the error occur

**Stacktrace**
Include stack backtrace, if any. Run with `RUST_BACKTRACE=1` to get complete stack backtrace.

**Context**
Please include
- Operating system and OS/kernel version
- Debug output for the application (run with `-D` or `--debug`)

**Additional context**
Add any other context about the problem here.
17 changes: 17 additions & 0 deletions .github/workflows/audit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Security Audit
on:
push:
paths:
- '**/Cargo.toml'
- '**/Cargo.lock'
schedule:
- cron: '0 0 * * 2'

jobs:
security_audit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions-rs/audit-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
45 changes: 45 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Build & Test
on:
push:
paths:
- "**/Cargo.toml"
- "**/Cargo.lock"
- "src/**"
- "tests/**"
- "examples/**"
- ".github/workflows/rust.yml"
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
max-parallel: 3
fail-fast: false
steps:
- uses: actions/checkout@v1
- uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Fetch Dependencies
run: cargo fetch
- name: Build
run: cargo build --all-features
- name: Run tests
run: cargo test

lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- run: rustup component add clippy
- uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --all-features
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/target
/Cargo.lock
5 changes: 5 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[package]
name = "prio"
version = "0.1.0"
authors = ["Anton Österberg <anton@42x.io>"]
edition = "2021"
21 changes: 21 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2023 Anton Österberg

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
28 changes: 28 additions & 0 deletions rustfmt.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
brace_style="SameLineWhere"
control_brace_style="AlwaysSameLine"
error_on_line_overflow=true
fn_params_layout="Tall"
format_code_in_doc_comments=true
group_imports="StdExternalCrate"
hard_tabs=false
imports_granularity="Module"
indent_style="Block"
max_width=100
merge_derives=true
newline_style="Unix"
normalize_comments=true
remove_nested_parens=true
reorder_impl_items=true
reorder_imports=true
reorder_modules=true
space_after_colon=true
space_before_colon=false
spaces_around_ranges=false
tab_spaces=4
trailing_comma="Vertical"
unstable_features=true
use_field_init_shorthand=true
# https://rust-lang.github.io/rustfmt/#use_small_heuristics
use_small_heuristics="Default"
where_single_line=true
wrap_comments=true
Loading

0 comments on commit 7048d11

Please sign in to comment.