Skip to content

Commit

Permalink
Overhaul Syntax (#225)
Browse files Browse the repository at this point in the history
* feat: strip down repo, upgrade deps, etc

* chore: rebase onto main

* feat: massive overhaul, cleanup of repo

* lint: cleanup

* fix: attempt gitguardian fix

* fix: lints
  • Loading branch information
tbraun96 authored Nov 29, 2024
1 parent 5d71669 commit d054a48
Show file tree
Hide file tree
Showing 155 changed files with 3,756 additions and 1,737 deletions.
7 changes: 6 additions & 1 deletion .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
[target.wasm32-wasi]
rustflags = ["--cfg", "tokio_unstable", "-C", "target-feature=+atomics,+bulk-memory"]
rustflags = ["-C", "target-feature=+atomics,+bulk-memory,+threads,+net"]

[profile.wasix]
opt-level = 3
inherits = "dev"
rustflags = ["-Z", "unstable-options"]
22 changes: 22 additions & 0 deletions .gitguardian.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
version: 2

exit_zero: false
verbose: false
instance: https://dashboard.gitguardian.com
max_commits_for_hook: 50
allow_self_signed: true

secret:
ignored_paths:
- '**/README.md'
- 'LICENSE'
ignored_matches:
- name: test-password
match: notsecurepassword

show_secrets: false

ignore_known_secrets: true

ignore-policies:
- id: 2881463
68 changes: 34 additions & 34 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
core_libs:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
os: [ ubuntu-latest, macos-latest, windows-latest ]
runs-on: ${{ matrix.os }}
timeout-minutes: 80
steps:
Expand All @@ -40,7 +40,7 @@ jobs:
run: mysql -uroot -h127.0.0.1 -ppassword -e 'CREATE DATABASE hyxewave; CREATE DATABASE hyxewave2; set global max_connections = 1000;'
- name: Augment connection size for psql
if: startsWith(matrix.os, 'ubuntu')
run: psql -c 'ALTER SYSTEM SET max_connections TO 1000' postgresql://postgres:postgres@localhost/hyxewave && psql -c 'ALTER SYSTEM SET max_connections TO 1000' postgresql://postgres:postgres@localhost/hyxewave2
run: psql -c 'ALTER SYSTEM SET max_connections TO 1000' postgresql://postgres:postgres@localhost/hyxewave && psql -c 'ALTER SYSTEM SET max_connections TO 1000' postgresql://postgres:postgres@localhost/hyxewave2
- name: Add sqlite databases
if: startsWith(matrix.os, 'ubuntu')
run: touch /home/runner/hyxewave.db && touch /home/runner/hyxewave2.db
Expand Down Expand Up @@ -127,47 +127,47 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: Avarok-Cybersecurity/gh-actions-deps@master
# - name: Install Valgrind
# run: |
# sudo apt-get update -y
# sudo apt-get install -y valgrind
# # Compile tests
# - name: cargo build secmem_bytes_test
# run: cargo build --bin secmem_bytes_test
# - name: Install Valgrind
# run: |
# sudo apt-get update -y
# sudo apt-get install -y valgrind
# # Compile tests
# - name: cargo build secmem_bytes_test
# run: cargo build --bin secmem_bytes_test
# Run with valgrind
# - name: Run valgrind secmem_bytes
# run: valgrind --error-exitcode=1 --leak-check=full --show-leak-kinds=all ./target/debug/secmem_bytes_test
# - name: cargo build secmem_string_test
# run: cargo build --bin secmem_string_test
# - name: Run valgrind secmem_bytes
# run: valgrind --error-exitcode=1 --leak-check=full --show-leak-kinds=all ./target/debug/secmem_bytes_test
# - name: cargo build secmem_string_test
# run: cargo build --bin secmem_string_test
# Run with valgrind
# - name: Run valgrind secmem_string
# run: valgrind --error-exitcode=1 --leak-check=full --show-leak-kinds=all ./target/debug/secmem_string_test
# - name: Run valgrind secmem_string
# run: valgrind --error-exitcode=1 --leak-check=full --show-leak-kinds=all ./target/debug/secmem_string_test
- run: cargo check --package citadel_sdk --release --features=webrtc,sql,redis,multi-threaded
- run: cargo install --locked cargo-deny && cargo deny check all
- run: rustup component add clippy-preview
- run: cargo clippy --features=webrtc,sql,redis,multi-threaded -- -D warnings
- run: cargo clippy --features=webrtc,sql,redis,multi-threaded --release -- -D warnings
- run: cargo clippy --features=webrtc,sql,redis -- -D warnings
- run: cargo clippy --features=webrtc,sql,redis --release -- -D warnings
- run: cargo clippy --tests -- -D warnings
- run: cargo clippy --tests --examples -- -D warnings
- run: cargo fmt --check
- run: RUSTDOCFLAGS="-D warnings" cargo make docs
- run: cargo test --package citadel_sdk --doc
# - name: cargo build pq_kems
# run: cargo build --bin pq_kems_test
# # Run with valgrind
# - name: Run valgrind pq_kems
# run: valgrind --error-exitcode=1 --leak-check=full --show-leak-kinds=all ./target/debug/pq_kems_test
# run: cargo build --bin pq_kems_test
# # Run with valgrind
# - name: Run valgrind pq_kems
# run: valgrind --error-exitcode=1 --leak-check=full --show-leak-kinds=all ./target/debug/pq_kems_test

# features_check:
# name: check features
# runs-on: ubuntu-latest
# steps:
# - uses: Avarok-Cybersecurity/gh-actions-deps@master
# - name: Install features checker
# run: cargo install cargo-all-features
# - name: Check all feature combinations
# run: cargo check-all-features --package citadel_sdk
# features_check:
# name: check features
# runs-on: ubuntu-latest
# steps:
# - uses: Avarok-Cybersecurity/gh-actions-deps@master
# - name: Install features checker
# run: cargo install cargo-all-features
# - name: Check all feature combinations
# run: cargo check-all-features --package citadel_sdk

coverage:
runs-on: macos-latest
Expand All @@ -192,11 +192,11 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
nat_type_client_a:
- "full_cone"
- "address_restricted"
- "port_restricted"
- "symmetric"
nat_type_client_a:
- "full_cone"
- "address_restricted"
- "port_restricted"
- "symmetric"
timeout-minutes: 60
env:
NAT_TYPE_CLIENT_A: ${{ matrix.nat_type_client_a }}
Expand Down
72 changes: 38 additions & 34 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,38 +3,41 @@ resolver = "2"

members = [
"citadel_sdk",
"citadel_wire",
"citadel_user",
"citadel_crypt",
"async_ip",
"citadel_pqcrypto",
"citadel_proto",
"citadel_wire",
"citadel_user",
"citadel_crypt",
"async_ip",
"citadel_pqcrypto",
"citadel_proto",
"firebase-rtdb",
"netbeam",
"citadel_logging",
"citadel_logging",
"citadel_io",
"citadel_types"
"citadel_types",
"example-library",
]

exclude = [
"./target/*",
"./examples"
]

[workspace.dependencies]
# workspace deps
citadel_sdk = { path = "./citadel_sdk", default-features = false, version = "0.11.2" }
citadel_wire = { path = "./citadel_wire", default-features = false, version = "0.11.2" }
citadel_user = { path = "./citadel_user", default-features = false, version = "0.11.2" }
citadel_crypt = { path = "./citadel_crypt", default-features = false, version = "0.11.2" }
citadel_pqcrypto = { path = "./citadel_pqcrypto", default-features = false, version = "0.11.2" }
citadel_proto = { path = "./citadel_proto", default-features = false, version = "0.11.2" }
citadel_logging = { path = "./citadel_logging", default-features = false, version = "0.11.2" }
citadel_io = { path = "./citadel_io", default-features = false, version = "0.11.2" }
citadel_types = { path = "./citadel_types", default-features = false, version = "0.11.2" }
netbeam = { path = "./netbeam", default-features = false, version = "0.11.2" }
firebase-rtdb = { path = "./firebase-rtdb", default-features = false, version = "0.11.2" }
async_ip = { path = "./async_ip", default-features = false, version = "0.11.2" }
citadel_sdk = { path = "./citadel_sdk", default-features = false }
citadel_wire = { path = "./citadel_wire", default-features = false }
citadel_user = { path = "./citadel_user", default-features = false }
citadel_crypt = { path = "./citadel_crypt", default-features = false }
citadel_pqcrypto = { path = "./citadel_pqcrypto", default-features = false }
citadel_proto = { path = "./citadel_proto", default-features = false }
citadel_logging = { path = "./citadel_logging", default-features = false }
citadel_io = { path = "./citadel_io", default-features = false }
citadel_types = { path = "./citadel_types", default-features = false }
netbeam = { path = "./netbeam", default-features = false }
firebase-rtdb = { path = "./firebase-rtdb", default-features = false }
async_ip = { path = "./async_ip", default-features = false }

# examples
citadel-examples = { path = "./example-library", default-features = false }

# ordinary deps
generic-array = { version = "0.14.6" }
Expand All @@ -50,11 +53,11 @@ getrandom = { version = "0.2.8", default-features = false }
serde-big-array = { default-features = false, version = "0.5.0" }
ascon-aead = { default-features = false, version = "0.4.0" }
oqs = { version = "0.9.0", default-features = false }
pqcrypto-falcon-wasi = { version = "0.2.14", default-features=false}
pqcrypto-falcon-wasi = { version = "0.2.14", default-features = false }
pqcrypto-traits-wasi = { version = "0.3.4", default-features = false }
tracing-subscriber = { version = "0.3.16" }
reqwest-wasm = { version = "0.11.16", default-features = false }
reqwest = { version = "0.11.13", default-features = false }
reqwest_wasi = { version = "0.11.16", default-features = false }
reqwest = { version = "0.12.7", default-features = false }
tokio = { version = "1.36.0" }
bytes = { default-features = false, version = "1.3.0" }
async-trait = { default-features = false, version = "0.1.61" }
Expand All @@ -65,9 +68,9 @@ sync_wrapper = { default-features = false, version = "1.0.0" }
async-recursion = { version = "1.0.4" }
rstest = { version = "0.23.0" }
bincode = { default-features = false, version = "1.3.3" }
serde = { version="1.0.152", default-features = false }
serde = { version = "1.0.152", default-features = false }
futures = { version = "0.3.25", default-features = false }
byteorder = { version = "1.4.3", default-features=false }
byteorder = { version = "1.4.3", default-features = false }
num-integer = { default-features = false, version = "0.1.45" }
arrayvec = { version = "0.7.2", default-features = false }
bitvec = { default-features = false, version = "1.0.1" }
Expand All @@ -84,14 +87,14 @@ uuid = { version = "1.2.2", default-features = false }
tracing = { version = "0.1.37", default-features = false }
lazy_static = { default-features = false, version = "1.4.0" }
socket2 = { version = "0.5.7", default-features = false }
rustls-native-certs = { version = "0.6.2", default-features = false }
rustls-native-certs = { version = "0.8.0", default-features = false }
igd = { version = "^0.12.0", default-features = false }
quinn = { version = "0.10.2", default-features = false }
quinn = { version = "0.11.5", default-features = false }
stun = { default-features = false, version = "0.5.0" }
rcgen = { default-features = false, version = "0.11.2" }
rustls = { version = "0.21.6", default-features = false }
rustls-pemfile = { default-features = false, version = "1.0.1" }
tokio-rustls = { default-features = false, version = "0.24.1" }
rcgen = { default-features = false, version = "0.13.1" }
rustls = { version = "0.23.13", default-features = false }
rustls-pemfile = { default-features = false, version = "2.1.3" }
tokio-rustls = { default-features = false, version = "0.26.0" }
itertools = { version = "0.11.0", default-features = false }
serde_millis = { default-features = false, version = "0.1.1" }
multimap = { default-features = false, version = "0.9.0" }
Expand All @@ -104,17 +107,18 @@ sqlx = { version = "0.7.2" }
redis-base = { package = "redis", version = "0.23.0" }
mobc = { version = "0.8.1", default-features = false }
jwt = { version = "0.16.0", default-features = false }
openssl = { version = "0.10.46", default-features = false }
openssl = { version = "0.10.66", default-features = false }
chrono = { default-features = false, version = "0.4.23" }
tokio-util = { version = "0.7.4", default-features = false }
dirs2 = { default-features = false, version = "3.0.1" }
embedded-semver = { version = "0.3.0", default-features = false }
auto_impl = { default-features = false, version = "1.0.1" }
zerocopy = { default-features = false, version = "0.7.7" }
atomic = { default-features = false, version = "0.6.0" }
bytemuck = { default-features = false, version = "1.13.1"}
bytemuck = { default-features = false, version = "1.13.1" }
either = { default-features = false, version = "1.8.0" }
once_cell = { default-features = false, version = "1.17.0" }
webrtc-util = { version = "0.8.0" }
embed-doc-image = { version = "0.1.4" }
hyper = { version = "0.14.25" }
sha256 = { version = "1.5.0" }
Loading

0 comments on commit d054a48

Please sign in to comment.