mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2025-07-27 18:28: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:
parent
b7a0442298
commit
66181c61af
10 changed files with 64 additions and 24 deletions
|
@ -73,7 +73,7 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
cargo clippy \
|
cargo clippy \
|
||||||
--workspace \
|
--workspace \
|
||||||
--all-features \
|
--features full \
|
||||||
--locked \
|
--locked \
|
||||||
--no-deps \
|
--no-deps \
|
||||||
--profile test \
|
--profile test \
|
||||||
|
@ -133,7 +133,7 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
cargo test \
|
cargo test \
|
||||||
--workspace \
|
--workspace \
|
||||||
--all-features \
|
--features full \
|
||||||
--locked \
|
--locked \
|
||||||
--profile test \
|
--profile test \
|
||||||
--all-targets \
|
--all-targets \
|
||||||
|
|
|
@ -65,11 +65,11 @@ Tests, compilation, and linting can be run with standard Cargo commands:
|
||||||
cargo test
|
cargo test
|
||||||
|
|
||||||
# Check compilation
|
# Check compilation
|
||||||
cargo check --workspace --all-features
|
cargo check --workspace --features full
|
||||||
|
|
||||||
# Run lints
|
# Run lints
|
||||||
cargo clippy --workspace --all-features
|
cargo clippy --workspace --features full
|
||||||
# Auto-fix: cargo clippy --workspace --all-features --fix --allow-staged;
|
# Auto-fix: cargo clippy --workspace --features full --fix --allow-staged;
|
||||||
|
|
||||||
# Format code (must use nightly)
|
# Format code (must use nightly)
|
||||||
cargo +nightly fmt
|
cargo +nightly fmt
|
||||||
|
|
29
Cargo.lock
generated
29
Cargo.lock
generated
|
@ -543,6 +543,24 @@ dependencies = [
|
||||||
"syn",
|
"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]]
|
[[package]]
|
||||||
name = "bit_field"
|
name = "bit_field"
|
||||||
version = "0.10.2"
|
version = "0.10.2"
|
||||||
|
@ -847,7 +865,6 @@ dependencies = [
|
||||||
name = "conduwuit"
|
name = "conduwuit"
|
||||||
version = "0.5.0-rc.6"
|
version = "0.5.0-rc.6"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bindgen 0.71.1",
|
|
||||||
"clap",
|
"clap",
|
||||||
"conduwuit_admin",
|
"conduwuit_admin",
|
||||||
"conduwuit_api",
|
"conduwuit_api",
|
||||||
|
@ -4117,10 +4134,10 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rust-librocksdb-sys"
|
name = "rust-librocksdb-sys"
|
||||||
version = "0.33.0+9.11.1"
|
version = "0.38.0+10.4.2"
|
||||||
source = "git+https://forgejo.ellis.link/continuwuation/rust-rocksdb-zaidoon1?rev=fc9a99ac54a54208f90fdcba33ae6ee8bc3531dd#fc9a99ac54a54208f90fdcba33ae6ee8bc3531dd"
|
source = "git+https://forgejo.ellis.link/continuwuation/rust-rocksdb-zaidoon1?rev=01e1128898fc4bbb776e7a6deec2aa3b675b0442#01e1128898fc4bbb776e7a6deec2aa3b675b0442"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bindgen 0.71.1",
|
"bindgen 0.72.0",
|
||||||
"bzip2-sys",
|
"bzip2-sys",
|
||||||
"cc",
|
"cc",
|
||||||
"glob",
|
"glob",
|
||||||
|
@ -4134,8 +4151,8 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rust-rocksdb"
|
name = "rust-rocksdb"
|
||||||
version = "0.37.0"
|
version = "0.42.1"
|
||||||
source = "git+https://forgejo.ellis.link/continuwuation/rust-rocksdb-zaidoon1?rev=fc9a99ac54a54208f90fdcba33ae6ee8bc3531dd#fc9a99ac54a54208f90fdcba33ae6ee8bc3531dd"
|
source = "git+https://forgejo.ellis.link/continuwuation/rust-rocksdb-zaidoon1?rev=01e1128898fc4bbb776e7a6deec2aa3b675b0442#01e1128898fc4bbb776e7a6deec2aa3b675b0442"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"libc",
|
"libc",
|
||||||
"rust-librocksdb-sys",
|
"rust-librocksdb-sys",
|
||||||
|
|
|
@ -391,7 +391,7 @@ features = [
|
||||||
|
|
||||||
[workspace.dependencies.rust-rocksdb]
|
[workspace.dependencies.rust-rocksdb]
|
||||||
git = "https://forgejo.ellis.link/continuwuation/rust-rocksdb-zaidoon1"
|
git = "https://forgejo.ellis.link/continuwuation/rust-rocksdb-zaidoon1"
|
||||||
rev = "fc9a99ac54a54208f90fdcba33ae6ee8bc3531dd"
|
rev = "01e1128898fc4bbb776e7a6deec2aa3b675b0442"
|
||||||
default-features = false
|
default-features = false
|
||||||
features = [
|
features = [
|
||||||
"multi-threaded-cf",
|
"multi-threaded-cf",
|
||||||
|
|
|
@ -133,7 +133,7 @@ RUN --mount=type=cache,target=/usr/local/cargo/registry \
|
||||||
mkdir /out/sbin
|
mkdir /out/sbin
|
||||||
PACKAGE=conduwuit
|
PACKAGE=conduwuit
|
||||||
xx-cargo build --locked --profile ${RUST_PROFILE} \
|
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 | \
|
BINARIES=($(cargo metadata --no-deps --format-version 1 | \
|
||||||
jq -r ".packages[] | select(.name == \"$PACKAGE\") | .targets[] | select( .kind | map(. == \"bin\") | any ) | .name"))
|
jq -r ".packages[] | select(.name == \"$PACKAGE\") | .targets[] | select( .kind | map(. == \"bin\") | any ) | .name"))
|
||||||
for BINARY in "${BINARIES[@]}"; do
|
for BINARY in "${BINARIES[@]}"; do
|
||||||
|
|
|
@ -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`
|
- (On linux) `pkg-config` on the compiling machine to allow finding `liburing`
|
||||||
- A C++ compiler and (on linux) `libclang` for RocksDB
|
- 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
|
### Building with Nix
|
||||||
|
|
||||||
|
|
|
@ -83,7 +83,7 @@ env DIRENV_DEVSHELL=all-features \
|
||||||
--workspace \
|
--workspace \
|
||||||
--locked \
|
--locked \
|
||||||
--profile test \
|
--profile test \
|
||||||
--all-features \
|
--features full \
|
||||||
--no-deps \
|
--no-deps \
|
||||||
--document-private-items \
|
--document-private-items \
|
||||||
--color always
|
--color always
|
||||||
|
@ -96,7 +96,7 @@ script = """
|
||||||
direnv exec . \
|
direnv exec . \
|
||||||
cargo clippy \
|
cargo clippy \
|
||||||
--workspace \
|
--workspace \
|
||||||
--all-features \
|
--features full \
|
||||||
--locked \
|
--locked \
|
||||||
--profile test \
|
--profile test \
|
||||||
--color=always \
|
--color=always \
|
||||||
|
@ -114,7 +114,7 @@ env DIRENV_DEVSHELL=all-features \
|
||||||
--workspace \
|
--workspace \
|
||||||
--locked \
|
--locked \
|
||||||
--profile test \
|
--profile test \
|
||||||
--all-features \
|
--features full \
|
||||||
--color=always \
|
--color=always \
|
||||||
-- \
|
-- \
|
||||||
-D warnings
|
-D warnings
|
||||||
|
|
|
@ -44,6 +44,14 @@ zstd_compression = [
|
||||||
"conduwuit-core/zstd_compression",
|
"conduwuit-core/zstd_compression",
|
||||||
"rust-rocksdb/zstd",
|
"rust-rocksdb/zstd",
|
||||||
]
|
]
|
||||||
|
bindgen-static = [
|
||||||
|
# "bindgen/static"
|
||||||
|
# "clang-sys/static"
|
||||||
|
"rust-rocksdb/bindgen-static"
|
||||||
|
]
|
||||||
|
bindgen-runtime = [
|
||||||
|
"rust-rocksdb/bindgen-runtime"
|
||||||
|
]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
async-channel.workspace = true
|
async-channel.workspace = true
|
||||||
|
|
|
@ -43,6 +43,11 @@ assets = [
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = [
|
default = [
|
||||||
|
"standard",
|
||||||
|
"release_max_log_level",
|
||||||
|
"bindgen-runtime", # replace with bindgen-static on alpine
|
||||||
|
]
|
||||||
|
standard = [
|
||||||
"blurhashing",
|
"blurhashing",
|
||||||
"brotli_compression",
|
"brotli_compression",
|
||||||
"element_hacks",
|
"element_hacks",
|
||||||
|
@ -52,10 +57,17 @@ default = [
|
||||||
"jemalloc_conf",
|
"jemalloc_conf",
|
||||||
"journald",
|
"journald",
|
||||||
"media_thumbnail",
|
"media_thumbnail",
|
||||||
"release_max_log_level",
|
|
||||||
"systemd",
|
"systemd",
|
||||||
"url_preview",
|
"url_preview",
|
||||||
"zstd_compression",
|
"zstd_compression"
|
||||||
|
]
|
||||||
|
full = [
|
||||||
|
"standard",
|
||||||
|
"hardened_malloc",
|
||||||
|
"jemalloc_prof",
|
||||||
|
"perf_measurements",
|
||||||
|
"tokio_console"
|
||||||
|
# sentry_telemetry
|
||||||
]
|
]
|
||||||
|
|
||||||
blurhashing = [
|
blurhashing = [
|
||||||
|
@ -161,14 +173,17 @@ zstd_compression = [
|
||||||
conduwuit_mods = [
|
conduwuit_mods = [
|
||||||
"conduwuit-core/conduwuit_mods",
|
"conduwuit-core/conduwuit_mods",
|
||||||
]
|
]
|
||||||
|
bindgen-static = [
|
||||||
libclang_static = [
|
# "bindgen/static"
|
||||||
"bindgen/static"
|
|
||||||
# "clang-sys/static"
|
# "clang-sys/static"
|
||||||
|
"conduwuit-database/bindgen-static"
|
||||||
|
]
|
||||||
|
bindgen-runtime = [
|
||||||
|
"conduwuit-database/bindgen-runtime"
|
||||||
]
|
]
|
||||||
|
|
||||||
[build-dependencies]
|
[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}
|
# clang-sys = {version = "1", default-features = false}
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
|
|
|
@ -48,7 +48,7 @@ vector () {
|
||||||
VECTOR_OPTS=$@
|
VECTOR_OPTS=$@
|
||||||
element "$TOOLCHAIN" $VECTOR_OPTS --no-default-features
|
element "$TOOLCHAIN" $VECTOR_OPTS --no-default-features
|
||||||
element "$TOOLCHAIN" $VECTOR_OPTS --features=default
|
element "$TOOLCHAIN" $VECTOR_OPTS --features=default
|
||||||
element "$TOOLCHAIN" $VECTOR_OPTS --all-features
|
element "$TOOLCHAIN" $VECTOR_OPTS --features full
|
||||||
}
|
}
|
||||||
|
|
||||||
matrix () {
|
matrix () {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue