Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Turn ktls into a workspace, merge in ktls-sys #48

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
/target
/Cargo.lock

*coverage*
.direnv
.DS_Store
51 changes: 6 additions & 45 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,45 +1,6 @@
[package]
name = "ktls"
version = "6.0.0"
edition = "2021"
license = "MIT OR Apache-2.0"
repository = "https://github.com/bearcove/ktls"
documentation = "https://docs.rs/ktls"
authors = ["Amos Wenger <[email protected]>"]
readme = "README.md"
description = """
Configures kTLS for tokio-rustls client and server connections.
"""
rust-version = "1.75"

[dependencies]
libc = { version = "0.2.155", features = ["const-extern-fn"] }
thiserror = "1.0.63"
tracing = "0.1.40"
tokio-rustls = { default-features = false, version = "0.26.0" }
rustls = { version = "0.23.12", default-features = false }
smallvec = "1.13.2"
memoffset = "0.9.1"
pin-project-lite = "0.2.14"
tokio = { version = "1.39.2", features = ["net", "macros", "io-util"] }
ktls-sys = "1.0.1"
num_enum = "0.7.3"
futures-util = "0.3.30"
nix = { version = "0.29.0", features = ["socket", "uio", "net"] }

[dev-dependencies]
lazy_static = "1.5.0"
oorandom = "11.1.4"
rcgen = "0.13.1"
socket2 = "0.5.7"
test-case = "3.3.1"
thiserror = "1.0.63"
tokio = { version = "1.39.2", features = ["full"] }
tracing-subscriber = { version = "0.3.18", features = ["env-filter"] }

[features]
default = ["aws_lc_rs", "tls12"]
aws_lc_rs = ["rustls/aws_lc_rs", "tokio-rustls/aws_lc_rs"]
aws-lc-rs = ["aws_lc_rs"] # Alias because Cargo features commonly use `-`
ring = ["rustls/ring", "tokio-rustls/ring"]
tls12 = ["rustls/tls12", "tokio-rustls/tls12"]
[workspace]
members = [
"ktls",
"ktls-sys"
]
resolver = "2"
17 changes: 17 additions & 0 deletions ktls-sys/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Changelog
All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

## [1.0.1](https://github.com/bearcove/ktls-sys/compare/v1.0.0...v1.0.1) - 2024-03-20

### Other
- Configure release-plz
- hapsoc => bearcove
- Ignore .DS_Store files
- Switch to GitHub-hosted runners
- bump toolchain (for real)
- Bump toolchain
7 changes: 7 additions & 0 deletions ktls-sys/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions ktls-sys/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[package]
name = "ktls-sys"
version = "1.0.1"
edition = "2021"
license = "MIT OR Apache-2.0"
repository = "https://github.com/bearcove/ktls-sys"
documentation = "https://docs.rs/ktls-sys"
readme = "README.md"
description = """
FFI bindings for `linux/tls.h`
"""

[dependencies]
16 changes: 16 additions & 0 deletions ktls-sys/Justfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# just manual: https://github.com/casey/just#readme

_default:
just --list

# Run all tests with nextest and cargo-llvm-cov
ci-test:
#!/bin/bash -eux
cargo llvm-cov nextest --lcov --output-path coverage.lcov

# Run all tests with cargo nextest
test *args:
RUST_BACKTRACE=1 cargo nextest run {{args}}

check:
cargo clippy --all-targets
19 changes: 19 additions & 0 deletions ktls-sys/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# ktls-sys

`linux/tls.h` bindings, for TLS kernel offload.

Generated with `bindgen tls.h -o src/bindings.rs`

See <https://github.com/bearcove/ktls> for a higher-level / safer interface.

## Status

[![test pipeline](https://github.com/bearcove/ktls-sys/actions/workflows/test.yml/badge.svg)](https://github.com/bearcove/ktls-sys/actions/workflows/test.yml?query=branch%3Amain)
[![Coverage Status (codecov.io)](https://codecov.io/gh/bearcove/ktls-sys/branch/main/graph/badge.svg)](https://codecov.io/gh/bearcove/ktls-sys/)

## License

This project is primarily distributed under the terms of both the MIT license
and the Apache License (Version 2.0).

See [LICENSE-APACHE](LICENSE-APACHE) and [LICENSE-MIT](LICENSE-MIT) for details.
Loading
Loading