1
0
Fork 0
mirror of https://forgejo.ellis.link/continuwuation/continuwuity.git synced 2025-07-27 02:08:31 +00:00

chore: Update rocksdb, feature flag changes

Most of the way to static musl builds, just zlib I think
This commit is contained in:
Jade Ellis 2025-07-24 21:51:52 +01:00
parent b7a0442298
commit 66181c61af
No known key found for this signature in database
GPG key ID: 8705A2A3EBF77BD2
10 changed files with 64 additions and 24 deletions

View file

@ -73,7 +73,7 @@ jobs:
run: |
cargo clippy \
--workspace \
--all-features \
--features full \
--locked \
--no-deps \
--profile test \
@ -133,7 +133,7 @@ jobs:
run: |
cargo test \
--workspace \
--all-features \
--features full \
--locked \
--profile test \
--all-targets \

View file

@ -65,11 +65,11 @@ Tests, compilation, and linting can be run with standard Cargo commands:
cargo test
# Check compilation
cargo check --workspace --all-features
cargo check --workspace --features full
# Run lints
cargo clippy --workspace --all-features
# Auto-fix: cargo clippy --workspace --all-features --fix --allow-staged;
cargo clippy --workspace --features full
# Auto-fix: cargo clippy --workspace --features full --fix --allow-staged;
# Format code (must use nightly)
cargo +nightly fmt

29
Cargo.lock generated
View file

@ -543,6 +543,24 @@ dependencies = [
"syn",
]
[[package]]
name = "bindgen"
version = "0.72.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4f72209734318d0b619a5e0f5129918b848c416e122a3c4ce054e03cb87b726f"
dependencies = [
"bitflags 2.9.1",
"cexpr",
"clang-sys",
"itertools 0.12.1",
"proc-macro2",
"quote",
"regex",
"rustc-hash 2.1.1",
"shlex",
"syn",
]
[[package]]
name = "bit_field"
version = "0.10.2"
@ -847,7 +865,6 @@ dependencies = [
name = "conduwuit"
version = "0.5.0-rc.6"
dependencies = [
"bindgen 0.71.1",
"clap",
"conduwuit_admin",
"conduwuit_api",
@ -4117,10 +4134,10 @@ dependencies = [
[[package]]
name = "rust-librocksdb-sys"
version = "0.33.0+9.11.1"
source = "git+https://forgejo.ellis.link/continuwuation/rust-rocksdb-zaidoon1?rev=fc9a99ac54a54208f90fdcba33ae6ee8bc3531dd#fc9a99ac54a54208f90fdcba33ae6ee8bc3531dd"
version = "0.38.0+10.4.2"
source = "git+https://forgejo.ellis.link/continuwuation/rust-rocksdb-zaidoon1?rev=01e1128898fc4bbb776e7a6deec2aa3b675b0442#01e1128898fc4bbb776e7a6deec2aa3b675b0442"
dependencies = [
"bindgen 0.71.1",
"bindgen 0.72.0",
"bzip2-sys",
"cc",
"glob",
@ -4134,8 +4151,8 @@ dependencies = [
[[package]]
name = "rust-rocksdb"
version = "0.37.0"
source = "git+https://forgejo.ellis.link/continuwuation/rust-rocksdb-zaidoon1?rev=fc9a99ac54a54208f90fdcba33ae6ee8bc3531dd#fc9a99ac54a54208f90fdcba33ae6ee8bc3531dd"
version = "0.42.1"
source = "git+https://forgejo.ellis.link/continuwuation/rust-rocksdb-zaidoon1?rev=01e1128898fc4bbb776e7a6deec2aa3b675b0442#01e1128898fc4bbb776e7a6deec2aa3b675b0442"
dependencies = [
"libc",
"rust-librocksdb-sys",

View file

@ -391,7 +391,7 @@ features = [
[workspace.dependencies.rust-rocksdb]
git = "https://forgejo.ellis.link/continuwuation/rust-rocksdb-zaidoon1"
rev = "fc9a99ac54a54208f90fdcba33ae6ee8bc3531dd"
rev = "01e1128898fc4bbb776e7a6deec2aa3b675b0442"
default-features = false
features = [
"multi-threaded-cf",

View file

@ -133,7 +133,7 @@ RUN --mount=type=cache,target=/usr/local/cargo/registry \
mkdir /out/sbin
PACKAGE=conduwuit
xx-cargo build --locked --profile ${RUST_PROFILE} \
-p $PACKAGE --features libclang_static;
-p $PACKAGE --no-default-features --features bindgen-static,release_max_log_level,standard;
BINARIES=($(cargo metadata --no-deps --format-version 1 | \
jq -r ".packages[] | select(.name == \"$PACKAGE\") | .targets[] | select( .kind | map(. == \"bin\") | any ) | .name"))
for BINARY in "${BINARIES[@]}"; do

View file

@ -44,7 +44,7 @@ If wanting to build using standard Rust toolchains, make sure you install:
- (On linux) `pkg-config` on the compiling machine to allow finding `liburing`
- A C++ compiler and (on linux) `libclang` for RocksDB
You can build Continuwuity using `cargo build --release --all-features`.
You can build Continuwuity using `cargo build --release`.
### Building with Nix

View file

@ -83,7 +83,7 @@ env DIRENV_DEVSHELL=all-features \
--workspace \
--locked \
--profile test \
--all-features \
--features full \
--no-deps \
--document-private-items \
--color always
@ -96,7 +96,7 @@ script = """
direnv exec . \
cargo clippy \
--workspace \
--all-features \
--features full \
--locked \
--profile test \
--color=always \
@ -114,7 +114,7 @@ env DIRENV_DEVSHELL=all-features \
--workspace \
--locked \
--profile test \
--all-features \
--features full \
--color=always \
-- \
-D warnings

View file

@ -44,6 +44,14 @@ zstd_compression = [
"conduwuit-core/zstd_compression",
"rust-rocksdb/zstd",
]
bindgen-static = [
# "bindgen/static"
# "clang-sys/static"
"rust-rocksdb/bindgen-static"
]
bindgen-runtime = [
"rust-rocksdb/bindgen-runtime"
]
[dependencies]
async-channel.workspace = true

View file

@ -43,6 +43,11 @@ assets = [
[features]
default = [
"standard",
"release_max_log_level",
"bindgen-runtime", # replace with bindgen-static on alpine
]
standard = [
"blurhashing",
"brotli_compression",
"element_hacks",
@ -52,10 +57,17 @@ default = [
"jemalloc_conf",
"journald",
"media_thumbnail",
"release_max_log_level",
"systemd",
"url_preview",
"zstd_compression",
"zstd_compression"
]
full = [
"standard",
"hardened_malloc",
"jemalloc_prof",
"perf_measurements",
"tokio_console"
# sentry_telemetry
]
blurhashing = [
@ -161,14 +173,17 @@ zstd_compression = [
conduwuit_mods = [
"conduwuit-core/conduwuit_mods",
]
libclang_static = [
"bindgen/static"
bindgen-static = [
# "bindgen/static"
# "clang-sys/static"
"conduwuit-database/bindgen-static"
]
bindgen-runtime = [
"conduwuit-database/bindgen-runtime"
]
[build-dependencies]
bindgen = {version = "0.71.1", default-features = false}
# bindgen = {version = "0.71.1", default-features = false}
# clang-sys = {version = "1", default-features = false}
[dependencies]

View file

@ -48,7 +48,7 @@ vector () {
VECTOR_OPTS=$@
element "$TOOLCHAIN" $VECTOR_OPTS --no-default-features
element "$TOOLCHAIN" $VECTOR_OPTS --features=default
element "$TOOLCHAIN" $VECTOR_OPTS --all-features
element "$TOOLCHAIN" $VECTOR_OPTS --features full
}
matrix () {