Skip to content

Commit 841b84f

Browse files
committed
chore: initial commit
0 parents  commit 841b84f

29 files changed

+2829
-0
lines changed

.github/FUNDING.yml

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# These are supported funding model platforms
2+
3+
github: [dr-orlovsky, LNP-BP, BP-WG]

.github/workflows/build.yml

+87
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
name: Build
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
env:
10+
CARGO_TERM_COLOR: always
11+
12+
jobs:
13+
default:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v2
17+
- name: Install rust stable
18+
uses: actions-rs/toolchain@v1
19+
with:
20+
toolchain: stable
21+
override: true
22+
- name: Default build
23+
uses: actions-rs/cargo@v1
24+
with:
25+
command: check
26+
args: --workspace
27+
features:
28+
runs-on: ubuntu-latest
29+
strategy:
30+
fail-fast: false
31+
matrix:
32+
feature:
33+
- serde
34+
- cli
35+
steps:
36+
- uses: actions/checkout@v2
37+
- name: Install rust stable
38+
uses: actions-rs/toolchain@v1
39+
with:
40+
toolchain: stable
41+
override: true
42+
- name: Feature ${{ matrix.feature }}
43+
uses: actions-rs/cargo@v1
44+
with:
45+
command: check
46+
args: --no-default-features --features=${{ matrix.feature }}
47+
- name: Defaults + ${{ matrix.feature }}
48+
uses: actions-rs/cargo@v1
49+
with:
50+
command: check
51+
args: --features=${{ matrix.feature }}
52+
platforms:
53+
runs-on: ${{ matrix.os }}
54+
strategy:
55+
fail-fast: false
56+
matrix:
57+
os: [ ubuntu-20.04, ubuntu-22.04, macos-11, macos-12, windows-2019, windows-2022 ]
58+
steps:
59+
- uses: actions/checkout@v2
60+
- name: Install rust stable
61+
uses: actions-rs/toolchain@v1
62+
with:
63+
toolchain: stable
64+
override: true
65+
- name: Build with all features
66+
uses: actions-rs/cargo@v1
67+
with:
68+
command: check
69+
args: --workspace --all-targets --all-features
70+
toolchains:
71+
runs-on: ubuntu-latest
72+
strategy:
73+
fail-fast: false
74+
matrix:
75+
toolchain: [ nightly, beta, stable, 1.60.0 ]
76+
steps:
77+
- uses: actions/checkout@v2
78+
- name: Install rust ${{ matrix.toolchain }}
79+
uses: actions-rs/toolchain@v1
80+
with:
81+
toolchain: ${{ matrix.toolchain }}
82+
override: true
83+
- name: All features
84+
uses: actions-rs/cargo@v1
85+
with:
86+
command: check
87+
args: --workspace --all-targets --all-features

.github/workflows/codecov.yml

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Codecov
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
env:
10+
CARGO_TERM_COLOR: always
11+
12+
jobs:
13+
codecov:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v2
17+
- name: Install latest nightly
18+
uses: actions-rs/toolchain@v1
19+
with:
20+
toolchain: nightly
21+
override: true
22+
- name: Build & test
23+
uses: actions-rs/cargo@v1
24+
with:
25+
command: test
26+
args: --workspace --all-features --no-fail-fast
27+
env:
28+
CARGO_INCREMENTAL: '0'
29+
RUSTFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off'
30+
RUSTDOCFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off'
31+
- id: coverage
32+
name: Generate coverage
33+
uses: actions-rs/[email protected]
34+
with:
35+
args: >
36+
-t lcov
37+
--llvm
38+
--ignore-not-existing
39+
--ignore "/*"
40+
-o ./target/lcov.info
41+
./target/debug/
42+
- name: Upload coverage to Codecov
43+
uses: codecov/codecov-action@v1
44+
with:
45+
file: ${{ steps.coverage.outputs.report }}
46+
directory: ./coverage/reports/

.github/workflows/lint.yml

+57
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Lints
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
env:
10+
CARGO_TERM_COLOR: always
11+
12+
jobs:
13+
fmt:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v2
17+
- name: Install rustc nightly
18+
uses: actions-rs/toolchain@v1
19+
with:
20+
toolchain: nightly
21+
override: true
22+
components: rustfmt
23+
- uses: actions-rs/cargo@v1
24+
name: Formatting
25+
with:
26+
command: fmt
27+
args: --all -- --check
28+
clippy:
29+
runs-on: ubuntu-latest
30+
steps:
31+
- uses: actions/checkout@v2
32+
- name: Install rustc stable
33+
uses: actions-rs/toolchain@v1
34+
with:
35+
toolchain: stable
36+
override: true
37+
components: clippy
38+
- uses: actions-rs/cargo@v1
39+
name: Clippy
40+
with:
41+
command: clippy
42+
args: --workspace --all-features --all-targets
43+
doc:
44+
runs-on: ubuntu-latest
45+
steps:
46+
- uses: actions/checkout@v2
47+
- name: Install rustc nightly
48+
uses: actions-rs/toolchain@v1
49+
with:
50+
toolchain: nightly
51+
override: true
52+
components: rust-docs
53+
- uses: actions-rs/cargo@v1
54+
name: Doc
55+
with:
56+
command: doc
57+
args: --workspace --all-features

.github/workflows/test.yml

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Tests
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
env:
10+
CARGO_TERM_COLOR: always
11+
12+
jobs:
13+
testing:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v2
17+
- name: Install latest stable
18+
uses: actions-rs/toolchain@v1
19+
with:
20+
toolchain: stable
21+
override: true
22+
- name: Build & test
23+
uses: actions-rs/cargo@v1
24+
with:
25+
command: test
26+
args: --workspace --all-features --no-fail-fast

.gitignore

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Generated by Cargo
2+
# will have compiled files and executables
3+
target/
4+
5+
# These are backup files generated by rustfmt
6+
**/*.rs.bk
7+
8+
/.idea
9+
10+
*.swp
11+
12+
/dep_test

.rustfmt.toml

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
edition = "2021"
2+
3+
max_width = 100
4+
array_width = 100
5+
attr_fn_like_width = 100
6+
comment_width = 100
7+
chain_width = 100
8+
fn_call_width = 100
9+
single_line_if_else_max_width = 100
10+
11+
format_code_in_doc_comments = true
12+
fn_single_line = true
13+
format_macro_matchers = true
14+
format_strings = true
15+
merge_derives = false
16+
overflow_delimited_expr = true
17+
reorder_modules = false
18+
use_field_init_shorthand = true
19+
use_try_shorthand = true
20+
wrap_comments = true
21+
where_single_line = true
22+
unstable_features = true
23+
24+
imports_granularity = "Module"
25+
group_imports = "StdExternalCrate"

CODE_OF_CONDUCT.md

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Code of Conduct
2+
3+
We do not apply any code of conduct expectations for contributors and
4+
maintainers in their live and behaviour outside the scope of this project.
5+
We believe that a restriction is the word of sin: free people write code, take
6+
their decisions and act in a way they will, taking responsibility for the
7+
consequences.
8+
9+
Moreover, we will try to protect the freedom of speech of contributors, and
10+
explicit distance from personal or public life of contributors, as long as
11+
they behave in a civil and productive way when contributing and interacting
12+
within the project, and will go to great lengths to not deny anyone
13+
participation.
14+
15+
Actions within the technical scope of the project (code quality, spamming etc),
16+
as well as interaction with other maintainers and contributors of course is
17+
a factor of the access to the project development and lifecycle. The decision in
18+
these cases will be made by the project maintainers, with the right of veto or
19+
overriding vote reserved for the original project author, Maxim Orlovsky.

0 commit comments

Comments
 (0)