Skip to content

Commit

Permalink
Merge pull request #109 from hapsoc/fluke-rebrand
Browse files Browse the repository at this point in the history
chore!: Rebrand to fluke
  • Loading branch information
fasterthanlime authored Oct 2, 2023
2 parents d0e2ef3 + 48d68b7 commit 7800427
Show file tree
Hide file tree
Showing 226 changed files with 157 additions and 155 deletions.
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## Contributing to hring
## Contributing to fluke

hring is still experimental, but you can help by trying to build
fluke is still experimental, but you can help by trying to build
stuff with it.

The highest-impact work right now is probably picking up an h2spec
Expand Down
12 changes: 6 additions & 6 deletions Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ ci-test:
just build-testbed
source <(cargo llvm-cov show-env --export-prefix)
cargo llvm-cov clean --workspace
cargo nextest run --manifest-path crates/hring-hpack/Cargo.toml --features interop-tests --release
cargo nextest run --manifest-path crates/fluke-hpack/Cargo.toml --features interop-tests --release
cargo nextest run --profile ci
cargo run --bin hring-h2spec -- generic -j 'target/h2spec-generic.xml'
cargo run --bin hring-h2spec -- hpack -j 'target/h2spec-hpack.xml'
cargo run --bin hring-h2spec -- http2 -j 'target/h2spec-http2.xml'
cargo run --bin fluke-h2spec -- generic -j 'target/h2spec-generic.xml'
cargo run --bin fluke-h2spec -- hpack -j 'target/h2spec-hpack.xml'
cargo run --bin fluke-h2spec -- http2 -j 'target/h2spec-http2.xml'
cargo llvm-cov report --lcov --output-path coverage.lcov
codecov

Expand All @@ -37,9 +37,9 @@ bench *args:

h2spec *args:
#!/bin/bash -eux
export RUST_LOG="${RUST_LOG:-hring=debug,hring_hpack=info}"
export RUST_LOG="${RUST_LOG:-fluke=debug,fluke_hpack=info}"
export RUST_BACKTRACE=1
cargo run --bin hring-h2spec -- {{args}}
cargo run --bin fluke-h2spec -- {{args}}

check:
cargo clippy --all-targets --all-features
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# hring
# fluke

An experimental, HTTP/1.1 implementation in Rust on top of
[tokio-uring](https://github.com/tokio-rs/tokio-uring).
Expand All @@ -7,8 +7,8 @@ Nothing in this repo is final yet, look around, but do not use.

## Status

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

## License

Expand Down
6 changes: 3 additions & 3 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
ignore:
# note: maybe `maybe-uring` should be excluded too, we don't
# note: maybe `fluke-maybe-uring` should be excluded too, we don't
# test the non-uring codepath on linux, where coverage is measured.
- "test-crates/**"
- "crates/hring-h2spec/**"
- "crates/hring-bingo-ktls/**"
- "crates/fluke-h2spec/**"
- "crates/fluke-bingo-ktls/**"
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
[package]
name = "hring-buffet"
name = "fluke-buffet"
version = "0.1.0"
edition = "2021"
license = "MIT OR Apache-2.0"
repository = "https://github.com/hapsoc/hring"
documentation = "https://docs.rs/hring-buffet"
repository = "https://github.com/hapsoc/fluke"
documentation = "https://docs.rs/fluke-buffet"
readme = "README.md"
description = """
Buffer management for the `hring` crate.
Buffer management for the `fluke` crate.
"""

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[features]
default = ["tokio-uring"]
tokio-uring = ["maybe-uring/tokio-uring"]
tokio-uring = ["fluke-maybe-uring/tokio-uring"]
miri = []

[dependencies]
eyre = "0.6.8"
http = "0.2.9"
maybe-uring = { version = "0.1.0", path = "../maybe-uring" }
fluke-maybe-uring = { version = "0.1.0", path = "../fluke-maybe-uring" }
memchr = "2.5.0"
memmap2 = { version = "0.7.0", default-features = false }
nom = "7.1.3"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ impl ops::DerefMut for BufMut {
}
}

unsafe impl maybe_uring::buf::IoBuf for BufMut {
unsafe impl fluke_maybe_uring::buf::IoBuf for BufMut {
fn stable_ptr(&self) -> *const u8 {
unsafe { BUF_POOL.base_ptr(self.index).add(self.off as _) as *const u8 }
}
Expand All @@ -302,7 +302,7 @@ unsafe impl maybe_uring::buf::IoBuf for BufMut {
}
}

unsafe impl maybe_uring::buf::IoBufMut for BufMut {
unsafe impl fluke_maybe_uring::buf::IoBufMut for BufMut {
fn stable_mut_ptr(&mut self) -> *mut u8 {
unsafe { BUF_POOL.base_ptr(self.index).add(self.off as _) }
}
Expand Down Expand Up @@ -394,7 +394,7 @@ impl Buf {
}
}

unsafe impl maybe_uring::buf::IoBuf for Buf {
unsafe impl fluke_maybe_uring::buf::IoBuf for Buf {
fn stable_ptr(&self) -> *const u8 {
unsafe { BUF_POOL.base_ptr(self.index).add(self.off as _) as *const u8 }
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
use std::{fmt, ops::Deref, str::Utf8Error};

use http::header::HeaderName;
use maybe_uring::buf::IoBuf;
use fluke_maybe_uring::buf::IoBuf;

use crate::{Roll, RollStr};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use std::{
str::Utf8Error,
};

use maybe_uring::{
use fluke_maybe_uring::{
buf::{IoBuf, IoBufMut},
io::ReadOwned,
};
Expand Down Expand Up @@ -1094,13 +1094,13 @@ mod tests {
#[test]
#[cfg(not(feature = "miri"))]
fn test_roll_readfrom_start() {
use maybe_uring::io::ChanRead;
use fluke_maybe_uring::io::ChanRead;

maybe_uring::start(async move {
fluke_maybe_uring::start(async move {
let mut rm = RollMut::alloc().unwrap();

let (send, mut read) = ChanRead::new();
maybe_uring::spawn(async move {
fluke_maybe_uring::spawn(async move {
send.send("123456").await.unwrap();
});

Expand Down Expand Up @@ -1227,7 +1227,7 @@ mod tests {
#[test]
#[cfg(not(feature = "miri"))]
fn test_roll_iobuf() {
use maybe_uring::{
use fluke_maybe_uring::{
io::{IntoHalves, ReadOwned, WriteOwned},
net::{TcpListener, TcpStream},
};
Expand Down Expand Up @@ -1265,7 +1265,7 @@ mod tests {
Ok(())
}

maybe_uring::start(async move {
fluke_maybe_uring::start(async move {
let rm = RollMut::alloc().unwrap();
test_roll_iobuf_inner(rm).await.unwrap();

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
[package]
name = "hring-h2spec"
name = "fluke-h2spec"
version = "0.1.0"
edition = "2021"
publish = false

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
hring = { version = "0.1.0", path = "../../crates/hring", default-features = false }
fluke = { version = "0.1.0", path = "../../crates/fluke", default-features = false }
color-eyre = "0.6.2"
tokio = { version = "1.28.2", features = ["full"] }
tracing = "0.1.37"
tracing-subscriber = { version = "0.3.17", features = ["env-filter"] }
which = "4.4.0"
maybe-uring = { version = "0.1.0", path = "../../crates/maybe-uring", features = ["net"] }
fluke-maybe-uring = { version = "0.1.0", path = "../../crates/fluke-maybe-uring", features = ["net"] }

[features]
default = ["tokio-uring"]
tokio-uring = ["hring/tokio-uring", "maybe-uring/tokio-uring"]
tokio-uring = ["fluke/tokio-uring", "fluke-maybe-uring/tokio-uring"]
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@

use std::{collections::VecDeque, path::PathBuf};

use hring::buffet::RollMut;
use hring::{
use fluke::buffet::RollMut;
use fluke::{
http::{StatusCode, Version},
Body, BodyChunk, Encoder, ExpectResponseHeaders, Headers, Request, Responder, Response,
ResponseDone, ServerDriver,
};
use maybe_uring::{io::IntoHalves, net::TcpListener};
use fluke_maybe_uring::{io::IntoHalves, net::TcpListener};
use tokio::process::Command;
use tracing::{error, info};
use tracing_subscriber::EnvFilter;
Expand All @@ -36,7 +36,7 @@ fn main() {
}
};

maybe_uring::start(async move { real_main(h2spec_binary).await.unwrap() });
fluke_maybe_uring::start(async move { real_main(h2spec_binary).await.unwrap() });
}

struct SDriver;
Expand Down Expand Up @@ -129,12 +129,12 @@ pub(crate) async fn run_server(ln: TcpListener) -> color_eyre::Result<()> {
loop {
let (stream, addr) = ln.accept().await?;
tracing::info!(%addr, "Accepted connection from");
let conf = Rc::new(hring::h2::ServerConf::default());
let conf = Rc::new(fluke::h2::ServerConf::default());
let client_buf = RollMut::alloc()?;
let driver = Rc::new(SDriver);

tokio::task::spawn_local(async move {
if let Err(e) = hring::h2::serve(stream.into_halves(), conf, client_buf, driver).await {
if let Err(e) = fluke::h2::serve(stream.into_halves(), conf, client_buf, driver).await {
tracing::error!("error serving client {}: {}", addr, e);
}
});
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "hring-hpack"
name = "fluke-hpack"
version = "0.3.0"
authors = ["Marko Lalic <[email protected]>", "Amos Wenger <[email protected]>"]
edition = "2021"
Expand All @@ -8,13 +8,12 @@ exclude = [
"fixtures/*",
]

description = "A library implementing HPACK coding, for the hring project"
repository = "https://github.com/hapsoc/hring"
homepage = "https://github.com/hapsoc/hring"
description = "A library implementing HPACK coding, for the fluke project"
repository = "https://github.com/hapsoc/fluke"
readme = "README.md"
license = "MIT"
keywords = ["hpack", "http2", "encoding", "decoding"]
documentation = "https://docs.rs/hpack-hring"
documentation = "https://docs.rs/fluke-hpack"

[features]
# these are really slow unless `cargo test --release` is used, so they're optional
Expand Down
File renamed without changes.
8 changes: 4 additions & 4 deletions crates/hring-hpack/README.md → crates/fluke-hpack/README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# hring-hpack
# fluke-hpack

An [HPACK](http://http2.github.io/http2-spec/compression.html) coder implementation in Rust.

Forked from <https://github.com/mlalic/hpack-rs> in January of 2023, to add
functionality and let hring pass h2spec.
functionality and let fluke pass h2spec.

# Overview

Expand Down Expand Up @@ -32,7 +32,7 @@ Encode some pseudo-headers that are fully indexed by the
[static header table](http://http2.github.io/http2-spec/compression.html#static.table.definition).

```rust
use hring_hpack::Encoder;
use fluke_hpack::Encoder;

let mut encoder = Encoder::new();
let headers = vec![
Expand All @@ -53,7 +53,7 @@ Decode the headers from a raw byte sequence. In this case both of them are index
by the static table.

```rust
use hring_hpack::Decoder;
use fluke_hpack::Decoder;

let mut decoder = Decoder::new();
let header_list = decoder.decode(&[0x82, 0x84]).unwrap();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
//! A simple example of using the decoder that demonstrates its API:
//!
//! ```rust
//! use hring_hpack::Decoder;
//! use fluke_hpack::Decoder;
//! let mut decoder = Decoder::new();
//!
//! let header_list = decoder.decode(&[0x82, 0x84]).unwrap();
Expand All @@ -25,7 +25,7 @@
//! borrowed representation of each header, rather than an owned representation.
//!
//! ```rust
//! use hring_hpack::Decoder;
//! use fluke_hpack::Decoder;
//! let mut decoder = Decoder::new();
//!
//! let mut count = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
//! Encodes a header using a literal encoding.
//!
//! ```rust
//! use hring_hpack::Encoder;
//! use fluke_hpack::Encoder;
//!
//! let mut encoder = Encoder::new();
//!
Expand All @@ -32,7 +32,7 @@
//! Encodes some pseudo-headers that are already found in the static table.
//!
//! ```rust
//! use hring_hpack::Encoder;
//! use fluke_hpack::Encoder;
//!
//! let mut encoder = Encoder::new();
//! let headers = vec![
Expand Down Expand Up @@ -60,7 +60,7 @@ use super::STATIC_TABLE;
/// # Example
///
/// ```rust
/// use hring_hpack::encoder::encode_integer_into;
/// use fluke_hpack::encoder::encode_integer_into;
///
/// {
/// // No bits specified in the 3 most significant bits of the first octet
Expand Down Expand Up @@ -142,7 +142,7 @@ pub fn encode_integer(value: usize, prefix_size: u8) -> Vec<u8> {
/// representations, due to the utilization of HPACK compression.
///
/// ```rust
/// use hring_hpack::Encoder;
/// use fluke_hpack::Encoder;
///
/// let mut encoder = Encoder::new();
///
Expand Down Expand Up @@ -353,7 +353,7 @@ mod tests {

/// A helper function that checks whether the given buffer can be decoded
/// into a set of headers that corresponds to the given `headers` list.
/// Relies on using the `hring_hpack::decoder::Decoder`` struct for
/// Relies on using the `fluke_hpack::decoder::Decoder`` struct for
/// performing the decoding.
///
/// # Returns
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[package]
name = "maybe-uring"
name = "fluke-maybe-uring"
version = "0.1.0"
edition = "2021"
license = "MIT OR Apache-2.0"
repository = "https://github.com/hapsoc/hring"
documentation = "https://docs.rs/hring-buffet"
repository = "https://github.com/hapsoc/fluke"
documentation = "https://docs.rs/fluke-maybe-uring"
readme = "README.md"
description = """
Replicates some tokio-uring types to allow building code without it
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 7800427

Please sign in to comment.