Compare commits

...

26 commits

Author SHA1 Message Date
Jacob Taylor
db58d841aa
fix: Only load children of nested spaces
Some checks failed
Documentation / Build and Deploy Documentation (push) Has been skipped
Release Docker Image / define-variables (push) Failing after 3s
Release Docker Image / build-image (linux/amd64, release, linux-amd64, base) (push) Has been skipped
Release Docker Image / build-image (linux/arm64, release, linux-arm64, base) (push) Has been skipped
Release Docker Image / merge (push) Has been skipped
Checks / Prefligit / prefligit (push) Failing after 9s
Checks / Rust / Format (push) Failing after 6s
Checks / Rust / Clippy (push) Failing after 33s
Checks / Rust / Cargo Test (push) Failing after 31s
2025-06-25 18:17:06 +01:00
Jade Ellis
f1ca84fcaf
fix: Correct project brand in admin & OTEL
Some checks failed
Documentation / Build and Deploy Documentation (push) Has been skipped
Checks / Prefligit / prefligit (push) Failing after 1s
Release Docker Image / define-variables (push) Failing after 1s
Release Docker Image / build-image (linux/amd64, release, linux-amd64, base) (push) Has been skipped
Release Docker Image / build-image (linux/arm64, release, linux-arm64, base) (push) Has been skipped
Release Docker Image / merge (push) Has been skipped
Checks / Rust / Format (push) Failing after 3s
Checks / Rust / Clippy (push) Failing after 25s
Checks / Rust / Cargo Test (push) Failing after 25s
2025-06-24 23:16:48 +01:00
Jade Ellis
63962fc040
docs: Remove completed items from the README 2025-06-24 23:13:28 +01:00
Jade Ellis
a24278dc1b
docs: Update mirror badges 2025-06-24 23:12:09 +01:00
Jade Ellis
b787e97dc1
chore: Document & enforce conventional commit messages
Some checks failed
Release Docker Image / build-image (linux/amd64, release, linux-amd64, base) (push) Has been skipped
Release Docker Image / build-image (linux/arm64, release, linux-arm64, base) (push) Has been skipped
Release Docker Image / merge (push) Has been skipped
Documentation / Build and Deploy Documentation (push) Has been skipped
Checks / Prefligit / prefligit (push) Failing after 22s
Release Docker Image / define-variables (push) Failing after 5s
Checks / Rust / Format (push) Failing after 9s
Checks / Rust / Clippy (push) Failing after 51s
Checks / Rust / Cargo Test (push) Failing after 50s
2025-06-24 22:43:44 +01:00
Jade Ellis
eb75c4ecb0
chore: Fix typos in commit messages automatically 2025-06-24 22:43:44 +01:00
Jade Ellis
9bbe333082
ci: Don't run docs flow when the secret is inaccessible 2025-06-24 22:43:43 +01:00
Jade Ellis
3177545a6f
chore: Remove clippy pre-commit hook
It's too slow for a good git experience
2025-06-24 21:45:54 +01:00
Kimiblock Moe
4a289a9fee arch systemd: use credentials to load config
Some checks failed
Checks / Prefligit / prefligit (push) Failing after 5s
Release Docker Image / define-variables (push) Failing after 4s
Release Docker Image / build-image (linux/amd64, release, linux-amd64, base) (push) Has been skipped
Release Docker Image / build-image (linux/arm64, release, linux-arm64, base) (push) Has been skipped
Release Docker Image / merge (push) Has been skipped
Checks / Rust / Format (push) Failing after 2s
Documentation / Build and Deploy Documentation (push) Failing after 10s
Checks / Rust / Clippy (push) Failing after 29s
Checks / Rust / Cargo Test (push) Failing after 29s
2025-06-24 11:07:11 +00:00
Jade Ellis
4d69a1ad51
docs: Deduplicate sections
Some checks failed
Documentation / Build and Deploy Documentation (push) Failing after 14s
Checks / Prefligit / prefligit (push) Failing after 4s
Checks / Rust / Format (push) Failing after 5s
Checks / Rust / Clippy (push) Failing after 19s
Checks / Rust / Cargo Test (push) Failing after 18s
2025-06-23 01:25:38 +01:00
Jade Ellis
4f174324ba
docs: Update contributing guide 2025-06-23 01:04:27 +01:00
Jade Ellis
2ecbd75d64
ci: fixes
Some checks failed
Release Docker Image / build-image (linux/amd64, release, linux-amd64, base) (push) Has been skipped
Release Docker Image / build-image (linux/arm64, release, linux-arm64, base) (push) Has been skipped
Release Docker Image / merge (push) Has been skipped
Documentation / Build and Deploy Documentation (push) Failing after 14s
Checks / Prefligit / prefligit (push) Failing after 5s
Release Docker Image / define-variables (push) Failing after 2s
Checks / Rust / Format (push) Failing after 3s
Checks / Rust / Clippy (push) Failing after 9s
Checks / Rust / Cargo Test (push) Failing after 12s
- Install UV
- Verbose run
- Set permissions explicitly
- Check all files
2025-06-21 19:17:21 +01:00
Jade Ellis
a682e9dbb8
chore: Add commit to ignored revs 2025-06-21 18:03:38 +01:00
Jade Ellis
46c193e74b
chore: fix end of files & trailing whitespace 2025-06-21 17:59:01 +01:00
Jade Ellis
93719018a8
ci: Run additional sanity checks on repository 2025-06-21 17:58:28 +01:00
Jade Ellis
70df8364b3
chore: Bump rustyline-async from 0.4.3 to 0.4.6
Some checks failed
Documentation / Build and Deploy Documentation (push) Failing after 22s
Release Docker Image / define-variables (push) Failing after 2s
Release Docker Image / build-image (linux/amd64, release, linux-amd64, base) (push) Has been skipped
Release Docker Image / build-image (linux/arm64, release, linux-arm64, base) (push) Has been skipped
Release Docker Image / merge (push) Has been skipped
Rust Checks / Format (push) Failing after 2s
Rust Checks / Clippy (push) Failing after 21s
Rust Checks / Cargo Test (push) Failing after 19s
2025-06-21 00:50:02 +01:00
Jade Ellis
bae8192fb3
chore: Bump resolv-conf from 0.7.1 to 0.7.4 2025-06-20 23:39:20 +01:00
Jade Ellis
add5c7052c
chore: Update lockfile
Some checks failed
Release Docker Image / define-variables (push) Failing after 1s
Documentation / Build and Deploy Documentation (push) Failing after 4s
Release Docker Image / build-image (linux/amd64, release, linux-amd64, base) (push) Has been skipped
Release Docker Image / build-image (linux/arm64, release, linux-arm64, base) (push) Has been skipped
Release Docker Image / merge (push) Has been skipped
Rust Checks / Format (push) Failing after 1s
Rust Checks / Clippy (push) Failing after 32s
Rust Checks / Cargo Test (push) Failing after 37s
2025-06-20 21:51:53 +01:00
Jade Ellis
01200d9b54
build: Allow specifying build profile
Additionally splits caches by target CPU
2025-06-20 21:48:37 +01:00
Jade Ellis
0ba4a265be
build: Upgrade to Rust 1.87 2025-06-20 21:45:29 +01:00
Jade Ellis
08fbcbba69
build: Use newer LLVM for rust 1.87 2025-06-20 21:35:48 +01:00
Jade Ellis
b526935d45
build: Specify debian version 2025-06-20 21:35:03 +01:00
Jade Ellis
a737d845a4
chore: Don't specify targets in rust-toolchain 2025-06-20 21:25:34 +01:00
nex
e508b1197f feat: allow overriding the "most recent event" when forcing a state download (#853)
Some checks failed
Release Docker Image / define-variables (push) Failing after 3s
Release Docker Image / build-image (linux/amd64, linux-amd64) (push) Has been skipped
Release Docker Image / build-image (linux/arm64, linux-arm64) (push) Has been skipped
Release Docker Image / merge (push) Has been skipped
Rust Checks / Format (push) Failing after 2s
Documentation / Build and Deploy Documentation (push) Failing after 13s
Rust Checks / Clippy (push) Failing after 32s
Rust Checks / Cargo Test (push) Failing after 32s
Add option to select which event to set the state at to, for the force-set-room-state admin command.

This allows us to work around issues where the latest PDU is one that remote servers don't know about (i.e. failed federation for whatever reason)

Closes #852

Reviewed-on: https://forgejo.ellis.link/continuwuation/continuwuity/pulls/853
Reviewed-by: Jade Ellis <jade@ellis.link>
Co-authored-by: nex <nex@noreply.forgejo.ellis.link>
Co-committed-by: nex <nex@noreply.forgejo.ellis.link>
2025-06-19 21:27:50 +00:00
Kimiblock
d6fd30393c Update docs/deploying/arch-linux.md 2025-06-19 12:36:49 +00:00
Jade Ellis
6e16a6ef8f
chore: Release announcement
Some checks failed
Documentation / Build and Deploy Documentation (push) Failing after 3s
Rust Checks / Format (push) Failing after 1s
Rust Checks / Clippy (push) Failing after 10s
Rust Checks / Cargo Test (push) Failing after 10s
2025-06-14 22:34:24 +01:00
33 changed files with 745 additions and 391 deletions

View file

@ -23,6 +23,6 @@ indent_size = 2
indent_style = tab indent_style = tab
max_line_length = 98 max_line_length = 98
[{.forgejo/**/*.yml,.github/**/*.yml}] [*.yml]
indent_size = 2 indent_size = 2
indent_style = space indent_style = space

View file

@ -0,0 +1,27 @@
name: prefligit
description: |
Runs prefligit, pre-commit reimplemented in Rust.
inputs:
extra_args:
description: options to pass to pre-commit run
required: false
default: '--all-files'
runs:
using: composite
steps:
- name: Install uv
uses: https://github.com/astral-sh/setup-uv@v6
with:
enable-cache: true
ignore-nothing-to-cache: true
- name: Install Prefligit
shell: bash
run: |
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/j178/prefligit/releases/download/v0.0.10/prefligit-installer.sh | sh
- uses: actions/cache@v3
with:
path: ~/.cache/prefligit
key: prefligit-0|${{ hashFiles('.pre-commit-config.yaml') }}
- run: prefligit run --show-diff-on-failure --color=always -v ${{ inputs.extra_args }}
shell: bash

View file

@ -17,6 +17,7 @@ jobs:
docs: docs:
name: Build and Deploy Documentation name: Build and Deploy Documentation
runs-on: ubuntu-latest runs-on: ubuntu-latest
if: secrets.CLOUDFLARE_API_TOKEN != ''
steps: steps:
- name: Sync repository - name: Sync repository

View file

@ -0,0 +1,22 @@
name: Checks / Prefligit
on:
push:
pull_request:
permissions:
contents: read
jobs:
prefligit:
runs-on: ubuntu-latest
env:
FROM_REF: ${{ github.event.pull_request.base.sha || (!github.event.forced && ( github.event.before != '0000000000000000000000000000000000000000' && github.event.before || github.sha )) || format('{0}~', github.sha) }}
TO_REF: ${{ github.sha }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
persist-credentials: false
- uses: ./.forgejo/actions/prefligit
with:
extra_args: --all-files --hook-stage manual

View file

@ -49,6 +49,7 @@ jobs:
const platforms = ['linux/amd64', 'linux/arm64'] const platforms = ['linux/amd64', 'linux/arm64']
core.setOutput('build_matrix', JSON.stringify({ core.setOutput('build_matrix', JSON.stringify({
platform: platforms, platform: platforms,
target_cpu: ['base'],
include: platforms.map(platform => { return { include: platforms.map(platform => { return {
platform, platform,
slug: platform.replace('/', '-') slug: platform.replace('/', '-')
@ -66,6 +67,8 @@ jobs:
strategy: strategy:
matrix: matrix:
{ {
"target_cpu": ["base"],
"profile": ["release"],
"include": "include":
[ [
{ "platform": "linux/amd64", "slug": "linux-amd64" }, { "platform": "linux/amd64", "slug": "linux-amd64" },
@ -73,6 +76,7 @@ jobs:
], ],
"platform": ["linux/amd64", "linux/arm64"], "platform": ["linux/amd64", "linux/arm64"],
} }
steps: steps:
- name: Echo strategy - name: Echo strategy
run: echo '${{ toJSON(fromJSON(needs.define-variables.outputs.build_matrix)) }}' run: echo '${{ toJSON(fromJSON(needs.define-variables.outputs.build_matrix)) }}'
@ -140,8 +144,8 @@ jobs:
uses: actions/cache@v3 uses: actions/cache@v3
with: with:
path: | path: |
cargo-target-${{ matrix.slug }} cargo-target-${{ matrix.target_cpu }}-${{ matrix.slug }}-${{ matrix.profile }}
key: cargo-target-${{ matrix.slug }}-${{hashFiles('**/Cargo.lock') }}-${{steps.rust-toolchain.outputs.rustc_version}} key: cargo-target-${{ matrix.target_cpu }}-${{ matrix.slug }}-${{ matrix.profile }}-${{hashFiles('**/Cargo.lock') }}-${{steps.rust-toolchain.outputs.rustc_version}}
- name: Cache apt cache - name: Cache apt cache
id: cache-apt id: cache-apt
uses: actions/cache@v3 uses: actions/cache@v3
@ -163,9 +167,9 @@ jobs:
{ {
".cargo/registry": "/usr/local/cargo/registry", ".cargo/registry": "/usr/local/cargo/registry",
".cargo/git/db": "/usr/local/cargo/git/db", ".cargo/git/db": "/usr/local/cargo/git/db",
"cargo-target-${{ matrix.slug }}": { "cargo-target-${{ matrix.target_cpu }}-${{ matrix.slug }}-${{ matrix.profile }}": {
"target": "/app/target", "target": "/app/target",
"id": "cargo-target-${{ matrix.platform }}" "id": "cargo-target-${{ matrix.target_cpu }}-${{ matrix.slug }}-${{ matrix.profile }}"
}, },
"var-cache-apt-${{ matrix.slug }}": "/var/cache/apt", "var-cache-apt-${{ matrix.slug }}": "/var/cache/apt",
"var-lib-apt-${{ matrix.slug }}": "/var/lib/apt" "var-lib-apt-${{ matrix.slug }}": "/var/lib/apt"

View file

@ -1,4 +1,4 @@
name: Rust Checks name: Checks / Rust
on: on:
push: push:

View file

@ -5,3 +5,5 @@ f419c64aca300a338096b4e0db4c73ace54f23d0
# use chain_width 60 # use chain_width 60
162948313c212193965dece50b816ef0903172ba 162948313c212193965dece50b816ef0903172ba
5998a0d883d31b866f7c8c46433a8857eae51a89 5998a0d883d31b866f7c8c46433a8857eae51a89
# trailing whitespace and newlines
46c193e74b2ce86c48ce802333a0aabce37fd6e9

2
.gitattributes vendored
View file

@ -84,4 +84,4 @@ Cargo.lock text
*.zst binary *.zst binary
# Text files where line endings should be preserved # Text files where line endings should be preserved
*.patch -text *.patch -text

47
.pre-commit-config.yaml Normal file
View file

@ -0,0 +1,47 @@
default_install_hook_types:
- pre-commit
- commit-msg
default_stages:
- pre-commit
- manual
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-byte-order-marker
- id: check-case-conflict
- id: check-symlinks
- id: destroyed-symlinks
- id: check-yaml
- id: check-json
- id: check-toml
- id: end-of-file-fixer
- id: trailing-whitespace
- id: mixed-line-ending
- id: check-merge-conflict
- id: check-added-large-files
- repo: https://github.com/crate-ci/typos
rev: v1.26.0
hooks:
- id: typos
- id: typos
name: commit-msg-typos
stages: [commit-msg]
- repo: https://github.com/crate-ci/committed
rev: v1.1.7
hooks:
- id: committed
- repo: local
hooks:
- id: cargo-fmt
name: cargo fmt
entry: cargo +nightly fmt --
language: system
types: [rust]
pass_filenames: false
stages:
- pre-commit

View file

@ -1,6 +1,6 @@
# Contributing guide # Contributing guide
This page is for about contributing to Continuwuity. The This page is about contributing to Continuwuity. The
[development](./development.md) page may be of interest for you as well. [development](./development.md) page may be of interest for you as well.
If you would like to work on an [issue][issues] that is not assigned, preferably If you would like to work on an [issue][issues] that is not assigned, preferably
@ -10,7 +10,7 @@ and comment on it.
### Linting and Formatting ### Linting and Formatting
It is mandatory all your changes satisfy the lints (clippy, rustc, rustdoc, etc) It is mandatory all your changes satisfy the lints (clippy, rustc, rustdoc, etc)
and your code is formatted via the **nightly** `cargo fmt`. A lot of the and your code is formatted via the **nightly** rustfmt (`cargo +nightly fmt`). A lot of the
`rustfmt.toml` features depend on nightly toolchain. It would be ideal if they `rustfmt.toml` features depend on nightly toolchain. It would be ideal if they
weren't nightly-exclusive features, but they currently still are. CI's rustfmt weren't nightly-exclusive features, but they currently still are. CI's rustfmt
uses nightly. uses nightly.
@ -21,67 +21,91 @@ comment saying why. Do not write inefficient code for the sake of satisfying
lints. If a lint is wrong and provides a more inefficient solution or lints. If a lint is wrong and provides a more inefficient solution or
suggestion, allow the lint and mention that in a comment. suggestion, allow the lint and mention that in a comment.
### Running CI tests locally ### Pre-commit Checks
continuwuity's CI for tests, linting, formatting, audit, etc use Continuwuity uses pre-commit hooks to enforce various coding standards and catch common issues before they're committed. These checks include:
[`engage`][engage]. engage can be installed from nixpkgs or `cargo install
engage`. continuwuity's Nix flake devshell has the nixpkgs engage with `direnv`.
Use `engage --help` for more usage details.
To test, format, lint, etc that CI would do, install engage, allow the `.envrc` - Code formatting and linting
file using `direnv allow`, and run `engage`. - Typo detection (both in code and commit messages)
- Checking for large files
- Ensuring proper line endings and no trailing whitespace
- Validating YAML, JSON, and TOML files
- Checking for merge conflicts
All of the tasks are defined at the [engage.toml][engage.toml] file. You can You can run these checks locally by installing [prefligit](https://github.com/j178/prefligit):
view all of them neatly by running `engage list`
If you would like to run only a specific engage task group, use `just`:
- `engage just <group>` ```bash
- Example: `engage just lints` # Install prefligit using cargo-binstall
cargo binstall prefligit
If you would like to run a specific engage task in a specific group, use `just # Install git hooks to run checks automatically
<GROUP> [TASK]`: `engage just lints cargo-fmt` prefligit install
The following binaries are used in [`engage.toml`][engage.toml]: # Run all checks
prefligit --all-files
```
- [`engage`][engage] Alternatively, you can use [pre-commit](https://pre-commit.com/):
- `nix` ```bash
- [`direnv`][direnv] # Install pre-commit
- `rustc` pip install pre-commit
- `cargo`
- `cargo-fmt` # Install the hooks
- `rustdoc` pre-commit install
- `cargo-clippy`
- [`cargo-audit`][cargo-audit] # Run all checks manually
- [`cargo-deb`][cargo-deb] pre-commit run --all-files
- [`lychee`][lychee] ```
- [`markdownlint-cli`][markdownlint-cli]
- `dpkg` These same checks are run in CI via the prefligit-checks workflow to ensure consistency.
### Running tests locally
Tests, compilation, and linting can be run with standard Cargo commands:
```bash
# Run tests
cargo test
# Check compilation
cargo check --workspace
# Run lints
cargo clippy --workspace
# Auto-fix: cargo clippy --workspace --fix --allow-staged;
# Format code (must use nightly)
cargo +nightly fmt
```
### Matrix tests ### Matrix tests
CI runs [Complement][complement], but currently does not fail if results from Continuwuity uses [Complement][complement] for Matrix protocol compliance testing. Complement tests are run manually by developers, and documentation on how to run these tests locally is currently being developed.
the checked-in results differ with the new results. If your changes are done to
fix Matrix tests, note that in your pull request. If more Complement tests start
failing from your changes, please review the logs (they are uploaded as
artifacts) and determine if they're intended or not.
If you'd like to run Complement locally using Nix, see the If your changes are done to fix Matrix tests, please note that in your pull request. If more Complement tests start failing from your changes, please review the logs and determine if they're intended or not.
[testing](development/testing.md) page.
[Sytest][sytest] support will come soon. [Sytest][sytest] is currently unsupported.
### Writing documentation ### Writing documentation
Continuwuity's website uses [`mdbook`][mdbook] and deployed via CI using GitHub Continuwuity's website uses [`mdbook`][mdbook] and is deployed via CI using Cloudflare Pages
Pages in the [`documentation.yml`][documentation.yml] workflow file with Nix's in the [`documentation.yml`][documentation.yml] workflow file. All documentation is in the `docs/`
mdbook in the devshell. All documentation is in the `docs/` directory at the top directory at the top level.
level. The compiled mdbook website is also uploaded as an artifact.
To build the documentation using Nix, run: `bin/nix-build-and-cache just .#book` To build the documentation locally:
The output of the mdbook generation is in `result/`. mdbooks can be opened in 1. Install mdbook if you don't have it already:
your browser from the individual HTML files without any web server needed. ```bash
cargo install mdbook # or cargo binstall, or another method
```
2. Build the documentation:
```bash
mdbook build
```
The output of the mdbook generation is in `public/`. You can open the HTML files directly in your browser without needing a web server.
### Inclusivity and Diversity ### Inclusivity and Diversity
@ -109,6 +133,40 @@ Rust's default style and standards with regards to [function names, variable
names, comments](https://rust-lang.github.io/api-guidelines/naming.html), etc names, comments](https://rust-lang.github.io/api-guidelines/naming.html), etc
applies here. applies here.
### Commit Messages
Continuwuity follows the [Conventional Commits](https://www.conventionalcommits.org/) specification for commit messages. This provides a standardized format that makes the commit history more readable and enables automated tools to generate changelogs.
The basic structure is:
```
<type>[(optional scope)]: <description>
[optional body]
[optional footer(s)]
```
The allowed types for commits are:
- `fix`: Bug fixes
- `feat`: New features
- `docs`: Documentation changes
- `style`: Changes that don't affect the meaning of the code (formatting, etc.)
- `refactor`: Code changes that neither fix bugs nor add features
- `perf`: Performance improvements
- `test`: Adding or fixing tests
- `build`: Changes to the build system or dependencies
- `ci`: Changes to CI configuration
- `chore`: Other changes that don't modify source or test files
Examples:
```
feat: add user authentication
fix(database): resolve connection pooling issue
docs: update installation instructions
```
The project uses the `committed` hook to validate commit messages in pre-commit. This ensures all commits follow the conventional format.
### Creating pull requests ### Creating pull requests
Please try to keep contributions to the Forgejo Instance. While the mirrors of continuwuity Please try to keep contributions to the Forgejo Instance. While the mirrors of continuwuity
@ -118,6 +176,13 @@ This prevents us from having to ping once in a while to double check the status
of it, especially when the CI completed successfully and everything so it of it, especially when the CI completed successfully and everything so it
*looks* done. *looks* done.
Before submitting a pull request, please ensure:
1. Your code passes all CI checks (formatting, linting, typo detection, etc.)
2. Your commit messages follow the conventional commits format
3. Tests are added for new functionality
4. Documentation is updated if needed
Direct all PRs/MRs to the `main` branch. Direct all PRs/MRs to the `main` branch.
@ -125,20 +190,13 @@ By sending a pull request or patch, you are agreeing that your changes are
allowed to be licenced under the Apache-2.0 licence and all of your conduct is allowed to be licenced under the Apache-2.0 licence and all of your conduct is
in line with the Contributor's Covenant, and continuwuity's Code of Conduct. in line with the Contributor's Covenant, and continuwuity's Code of Conduct.
Contribution by users who violate either of these code of conducts will not have Contribution by users who violate either of these code of conducts may not have
their contributions accepted. This includes users who have been banned from their contributions accepted. This includes users who have been banned from
continuwuityMatrix rooms for Code of Conduct violations. continuwuity Matrix rooms for Code of Conduct violations.
[issues]: https://forgejo.ellis.link/continuwuation/continuwuity/issues [issues]: https://forgejo.ellis.link/continuwuation/continuwuity/issues
[continuwuity-matrix]: https://matrix.to/#/#continuwuity:continuwuity.org [continuwuity-matrix]: https://matrix.to/#/#continuwuity:continuwuity.org
[complement]: https://github.com/matrix-org/complement/ [complement]: https://github.com/matrix-org/complement/
[engage.toml]: https://forgejo.ellis.link/continuwuation/continuwuity/src/branch/main/engage.toml
[engage]: https://charles.page.computer.surgery/engage/
[sytest]: https://github.com/matrix-org/sytest/ [sytest]: https://github.com/matrix-org/sytest/
[cargo-deb]: https://github.com/kornelski/cargo-deb
[lychee]: https://github.com/lycheeverse/lychee
[markdownlint-cli]: https://github.com/igorshubovych/markdownlint-cli
[cargo-audit]: https://github.com/RustSec/rustsec/tree/main/cargo-audit
[direnv]: https://direnv.net/
[mdbook]: https://rust-lang.github.io/mdBook/ [mdbook]: https://rust-lang.github.io/mdBook/
[documentation.yml]: https://forgejo.ellis.link/continuwuation/continuwuity/src/branch/main/.forgejo/workflows/documentation.yml [documentation.yml]: https://forgejo.ellis.link/continuwuation/continuwuity/src/branch/main/.forgejo/workflows/documentation.yml

639
Cargo.lock generated

File diff suppressed because it is too large Load diff

View file

@ -381,7 +381,7 @@ features = [
"unstable-msc4121", "unstable-msc4121",
"unstable-msc4125", "unstable-msc4125",
"unstable-msc4186", "unstable-msc4186",
"unstable-msc4203", # sending to-device events to appservices "unstable-msc4203", # sending to-device events to appservices
"unstable-msc4210", # remove legacy mentions "unstable-msc4210", # remove legacy mentions
"unstable-extensible-events", "unstable-extensible-events",
"unstable-pdu", "unstable-pdu",
@ -556,11 +556,11 @@ rev = "1e64095a8051a1adf0d1faa307f9f030889ec2aa"
git = "https://forgejo.ellis.link/continuwuation/tracing" git = "https://forgejo.ellis.link/continuwuation/tracing"
rev = "1e64095a8051a1adf0d1faa307f9f030889ec2aa" rev = "1e64095a8051a1adf0d1faa307f9f030889ec2aa"
# adds a tab completion callback: https://forgejo.ellis.link/continuwuation/rustyline-async/commit/de26100b0db03e419a3d8e1dd26895d170d1fe50 # adds a tab completion callback: https://forgejo.ellis.link/continuwuation/rustyline-async/src/branch/main/.patchy/0002-add-tab-completion-callback.patch
# adds event for CTRL+\: https://forgejo.ellis.link/continuwuation/rustyline-async/commit/67d8c49aeac03a5ef4e818f663eaa94dd7bf339b # adds event for CTRL+\: https://forgejo.ellis.link/continuwuation/rustyline-async/src/branch/main/.patchy/0001-add-event-for-ctrl.patch
[patch.crates-io.rustyline-async] [patch.crates-io.rustyline-async]
git = "https://forgejo.ellis.link/continuwuation/rustyline-async" git = "https://forgejo.ellis.link/continuwuation/rustyline-async"
rev = "deaeb0694e2083f53d363b648da06e10fc13900c" rev = "e9f01cf8c6605483cb80b3b0309b400940493d7f"
# adds LIFO queue scheduling; this should be updated with PR progress. # adds LIFO queue scheduling; this should be updated with PR progress.
[patch.crates-io.event-listener] [patch.crates-io.event-listener]
@ -580,12 +580,11 @@ rev = "9c8e51510c35077df888ee72a36b4b05637147da"
git = "https://forgejo.ellis.link/continuwuation/hyper-util" git = "https://forgejo.ellis.link/continuwuation/hyper-util"
rev = "e4ae7628fe4fcdacef9788c4c8415317a4489941" rev = "e4ae7628fe4fcdacef9788c4c8415317a4489941"
# allows no-aaaa option in resolv.conf # Allows no-aaaa option in resolv.conf
# bumps rust edition and toolchain to 1.86.0 and 2024 # Use 1-indexed line numbers when displaying parse error messages
# use sat_add on line number errors
[patch.crates-io.resolv-conf] [patch.crates-io.resolv-conf]
git = "https://forgejo.ellis.link/continuwuation/resolv-conf" git = "https://forgejo.ellis.link/continuwuation/resolv-conf"
rev = "200e958941d522a70c5877e3d846f55b5586c68d" rev = "56251316cc4127bcbf36e68ce5e2093f4d33e227"
# #
# Our crates # Our crates

View file

@ -11,11 +11,13 @@ It's a community continuation of the [conduwuit](https://github.com/girlbossceo/
<!-- ANCHOR: body --> <!-- ANCHOR: body -->
[![forgejo.ellis.link](https://img.shields.io/badge/Ellis%20Git-main+packages-green?style=flat&logo=forgejo&labelColor=fff)](https://forgejo.ellis.link/continuwuation/continuwuity) ![](https://forgejo.ellis.link/continuwuation/continuwuity/badges/stars.svg?style=flat) [![](https://forgejo.ellis.link/continuwuation/continuwuity/badges/issues/open.svg?style=flat)](https://forgejo.ellis.link/continuwuation/continuwuity/issues?state=open) [![](https://forgejo.ellis.link/continuwuation/continuwuity/badges/pulls/open.svg?style=flat)](https://forgejo.ellis.link/continuwuation/continuwuity/pulls?state=open) [![forgejo.ellis.link](https://img.shields.io/badge/Ellis%20Git-main+packages-green?style=flat&logo=forgejo&labelColor=fff)](https://forgejo.ellis.link/continuwuation/continuwuity) [![Stars](https://forgejo.ellis.link/continuwuation/continuwuity/badges/stars.svg?style=flat)](https://forgejo.ellis.link/continuwuation/continuwuity/stars) [![Issues](https://forgejo.ellis.link/continuwuation/continuwuity/badges/issues/open.svg?style=flat)](https://forgejo.ellis.link/continuwuation/continuwuity/issues?state=open) [![Pull Requests](https://forgejo.ellis.link/continuwuation/continuwuity/badges/pulls/open.svg?style=flat)](https://forgejo.ellis.link/continuwuation/continuwuity/pulls?state=open)
[![GitHub](https://img.shields.io/badge/GitHub-mirror-blue?style=flat&logo=github&labelColor=fff&logoColor=24292f)](https://github.com/continuwuity/continuwuity) ![](https://img.shields.io/github/stars/continuwuity/continuwuity?style=flat) [![GitHub](https://img.shields.io/badge/GitHub-mirror-blue?style=flat&logo=github&labelColor=fff&logoColor=24292f)](https://github.com/continuwuity/continuwuity) [![Stars](https://img.shields.io/github/stars/continuwuity/continuwuity?style=flat)](https://github.com/continuwuity/continuwuity/stargazers)
[![Codeberg](https://img.shields.io/badge/Codeberg-mirror-2185D0?style=flat&logo=codeberg&labelColor=fff)](https://codeberg.org/nexy7574/continuwuity) ![](https://codeberg.org/nexy7574/continuwuity/badges/stars.svg?style=flat) [![GitLab](https://img.shields.io/badge/GitLab-mirror-blue?style=flat&logo=gitlab&labelColor=fff)](https://gitlab.com/continuwuity/continuwuity) [![Stars](https://img.shields.io/gitlab/stars/continuwuity/continuwuity?style=flat)](https://gitlab.com/continuwuity/continuwuity/-/starrers)
[![Codeberg](https://img.shields.io/badge/Codeberg-mirror-2185D0?style=flat&logo=codeberg&labelColor=fff)](https://codeberg.org/continuwuity/continuwuity) [![Stars](https://codeberg.org/continuwuity/continuwuity/badges/stars.svg?style=flat)](https://codeberg.org/continuwuity/continuwuity/stars)
### Why does this exist? ### Why does this exist?
@ -59,8 +61,6 @@ There are currently no open registration Continuwuity instances available.
We're working our way through all of the issues in the [Forgejo project](https://forgejo.ellis.link/continuwuation/continuwuity/issues). We're working our way through all of the issues in the [Forgejo project](https://forgejo.ellis.link/continuwuation/continuwuity/issues).
- [Replacing old conduwuit links with working continuwuity links](https://forgejo.ellis.link/continuwuation/continuwuity/issues/742)
- [Getting CI and docs deployment working on the new Forgejo project](https://forgejo.ellis.link/continuwuation/continuwuity/issues/740)
- [Packaging & availability in more places](https://forgejo.ellis.link/continuwuation/continuwuity/issues/747) - [Packaging & availability in more places](https://forgejo.ellis.link/continuwuation/continuwuity/issues/747)
- [Appservices bugs & features](https://forgejo.ellis.link/continuwuation/continuwuity/issues?q=&type=all&state=open&labels=178&milestone=0&assignee=0&poster=0) - [Appservices bugs & features](https://forgejo.ellis.link/continuwuation/continuwuity/issues?q=&type=all&state=open&labels=178&milestone=0&assignee=0&poster=0)
- [Improving compatibility and spec compliance](https://forgejo.ellis.link/continuwuation/continuwuity/issues?labels=119) - [Improving compatibility and spec compliance](https://forgejo.ellis.link/continuwuation/continuwuity/issues?labels=119)

View file

@ -6,6 +6,7 @@ After=network-online.target
Documentation=https://continuwuity.org/ Documentation=https://continuwuity.org/
RequiresMountsFor=/var/lib/private/conduwuit RequiresMountsFor=/var/lib/private/conduwuit
Alias=matrix-conduwuit.service Alias=matrix-conduwuit.service
[Service] [Service]
DynamicUser=yes DynamicUser=yes
Type=notify-reload Type=notify-reload
@ -59,7 +60,8 @@ StateDirectory=conduwuit
RuntimeDirectory=conduwuit RuntimeDirectory=conduwuit
RuntimeDirectoryMode=0750 RuntimeDirectoryMode=0750
Environment="CONTINUWUITY_CONFIG=/etc/conduwuit/conduwuit.toml" Environment=CONTINUWUITY_CONFIG=${CREDENTIALS_DIRECTORY}/config.toml
LoadCredential=config.toml:/etc/conduwuit/conduwuit.toml
BindPaths=/var/lib/private/conduwuit:/var/lib/matrix-conduit BindPaths=/var/lib/private/conduwuit:/var/lib/matrix-conduit
BindPaths=/var/lib/private/conduwuit:/var/lib/private/matrix-conduit BindPaths=/var/lib/private/conduwuit:/var/lib/private/matrix-conduit

2
committed.toml Normal file
View file

@ -0,0 +1,2 @@
style = "conventional"
allowed_types = ["ci", "build", "fix", "feat", "chore", "docs", "style", "refactor", "perf", "test"]

View file

@ -1,15 +1,16 @@
ARG RUST_VERSION=1 ARG RUST_VERSION=1
ARG DEBIAN_VERSION=bookworm
FROM --platform=$BUILDPLATFORM docker.io/tonistiigi/xx AS xx FROM --platform=$BUILDPLATFORM docker.io/tonistiigi/xx AS xx
FROM --platform=$BUILDPLATFORM rust:${RUST_VERSION}-slim-bookworm AS base FROM --platform=$BUILDPLATFORM rust:${RUST_VERSION}-slim-${DEBIAN_VERSION} AS base
FROM --platform=$BUILDPLATFORM rust:${RUST_VERSION}-slim-bookworm AS toolchain FROM --platform=$BUILDPLATFORM rust:${RUST_VERSION}-slim-${DEBIAN_VERSION} AS toolchain
# Prevent deletion of apt cache # Prevent deletion of apt cache
RUN rm -f /etc/apt/apt.conf.d/docker-clean RUN rm -f /etc/apt/apt.conf.d/docker-clean
# Match Rustc version as close as possible # Match Rustc version as close as possible
# rustc -vV # rustc -vV
ARG LLVM_VERSION=19 ARG LLVM_VERSION=20
# ENV RUSTUP_TOOLCHAIN=${RUST_VERSION} # ENV RUSTUP_TOOLCHAIN=${RUST_VERSION}
# Install repo tools # Install repo tools
@ -19,10 +20,18 @@ ARG LLVM_VERSION=19
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
--mount=type=cache,target=/var/lib/apt,sharing=locked \ --mount=type=cache,target=/var/lib/apt,sharing=locked \
apt-get update && apt-get install -y \ apt-get update && apt-get install -y \
clang-${LLVM_VERSION} lld-${LLVM_VERSION} pkg-config make jq \ pkg-config make jq \
curl git \ curl git software-properties-common \
file file
# LLVM packages
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
--mount=type=cache,target=/var/lib/apt,sharing=locked \
curl https://apt.llvm.org/llvm.sh > llvm.sh && \
chmod +x llvm.sh && \
./llvm.sh ${LLVM_VERSION} && \
rm llvm.sh
# Create symlinks for LLVM tools # Create symlinks for LLVM tools
RUN <<EOF RUN <<EOF
set -o xtrace set -o xtrace
@ -39,7 +48,7 @@ EOF
# Developer tool versions # Developer tool versions
# renovate: datasource=github-releases depName=cargo-bins/cargo-binstall # renovate: datasource=github-releases depName=cargo-bins/cargo-binstall
ENV BINSTALL_VERSION=1.12.3 ENV BINSTALL_VERSION=1.13.0
# renovate: datasource=github-releases depName=psastras/sbom-rs # renovate: datasource=github-releases depName=psastras/sbom-rs
ENV CARGO_SBOM_VERSION=0.9.1 ENV CARGO_SBOM_VERSION=0.9.1
# renovate: datasource=crate depName=lddtree # renovate: datasource=crate depName=lddtree
@ -140,11 +149,12 @@ ENV GIT_REMOTE_COMMIT_URL=$GIT_REMOTE_COMMIT_URL
ENV CONDUWUIT_VERSION_EXTRA=$CONDUWUIT_VERSION_EXTRA ENV CONDUWUIT_VERSION_EXTRA=$CONDUWUIT_VERSION_EXTRA
ENV CONTINUWUITY_VERSION_EXTRA=$CONTINUWUITY_VERSION_EXTRA ENV CONTINUWUITY_VERSION_EXTRA=$CONTINUWUITY_VERSION_EXTRA
ARG RUST_PROFILE=release
# Build the binary # Build the binary
RUN --mount=type=cache,target=/usr/local/cargo/registry \ RUN --mount=type=cache,target=/usr/local/cargo/registry \
--mount=type=cache,target=/usr/local/cargo/git/db \ --mount=type=cache,target=/usr/local/cargo/git/db \
--mount=type=cache,target=/app/target,id=cargo-target-${TARGETPLATFORM} \ --mount=type=cache,target=/app/target,id=cargo-target-${TARGET_CPU}-${TARGETPLATFORM}-${RUST_PROFILE} \
bash <<'EOF' bash <<'EOF'
set -o allexport set -o allexport
set -o xtrace set -o xtrace
@ -153,7 +163,7 @@ RUN --mount=type=cache,target=/usr/local/cargo/registry \
jq -r ".target_directory")) jq -r ".target_directory"))
mkdir /out/sbin mkdir /out/sbin
PACKAGE=conduwuit PACKAGE=conduwuit
xx-cargo build --locked --release \ xx-cargo build --locked --profile ${RUST_PROFILE} \
-p $PACKAGE; -p $PACKAGE;
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"))

View file

@ -1,3 +1,5 @@
# Continuwuity for Arch Linux # Continuwuity for Arch Linux
Continuwuity does not have any Arch Linux packages at this time. Continuwuity is available on the `archlinuxcn` repository and AUR, with the same package name `continuwuity`, which includes latest taggged version. The development version is available on AUR as `continuwuity-git`
Simply install the `continuwuity` package. Configure the service in `/etc/conduwuit/conduwuit.toml`, then enable/start the continuwuity.service.

View file

@ -34,4 +34,3 @@ services:
# - "traefik.http.routers.to-element-web.tls.certresolver=letsencrypt" # - "traefik.http.routers.to-element-web.tls.certresolver=letsencrypt"
# vim: ts=2:sw=2:expandtab # vim: ts=2:sw=2:expandtab

View file

@ -26,7 +26,7 @@ services:
restart: unless-stopped restart: unless-stopped
volumes: volumes:
- db:/var/lib/continuwuity - db:/var/lib/continuwuity
- /etc/resolv.conf:/etc/resolv.conf:ro # Use the host's DNS resolver rather than Docker's. - /etc/resolv.conf:/etc/resolv.conf:ro # Use the host's DNS resolver rather than Docker's.
#- ./continuwuity.toml:/etc/continuwuity.toml #- ./continuwuity.toml:/etc/continuwuity.toml
environment: environment:
CONTINUWUITY_SERVER_NAME: example.com # EDIT THIS CONTINUWUITY_SERVER_NAME: example.com # EDIT THIS

View file

@ -8,7 +8,7 @@ services:
restart: unless-stopped restart: unless-stopped
volumes: volumes:
- db:/var/lib/continuwuity - db:/var/lib/continuwuity
- /etc/resolv.conf:/etc/resolv.conf:ro # Use the host's DNS resolver rather than Docker's. - /etc/resolv.conf:/etc/resolv.conf:ro # Use the host's DNS resolver rather than Docker's.
#- ./continuwuity.toml:/etc/continuwuity.toml #- ./continuwuity.toml:/etc/continuwuity.toml
networks: networks:
- proxy - proxy

View file

@ -29,7 +29,7 @@ appropriately to use Continuwuity instead of Conduit.
Due to the lack of a Continuwuity NixOS module, when using the `services.matrix-conduit` module Due to the lack of a Continuwuity NixOS module, when using the `services.matrix-conduit` module
a workaround like the one below is necessary to use UNIX sockets. This is because the UNIX a workaround like the one below is necessary to use UNIX sockets. This is because the UNIX
socket option does not exist in Conduit, and the module forcibly sets the `address` and socket option does not exist in Conduit, and the module forcibly sets the `address` and
`port` config options. `port` config options.
```nix ```nix

View file

@ -68,31 +68,22 @@ do this if Rust supported workspace-level features to begin with.
## List of forked dependencies ## List of forked dependencies
During Continuwuity development, we have had to fork During Continuwuity (and prior projects) development, we have had to fork some dependencies to support our use-cases.
some dependencies to support our use-cases in some areas. This ranges from These forks exist for various reasons including features that upstream projects won't accept,
things said upstream project won't accept for any reason, faster-paced faster-paced development, Continuwuity-specific usecases, or lack of time to upstream changes.
development (unresponsive or slow upstream), Continuwuity-specific usecases, or
lack of time to upstream some things.
- [ruma/ruma][1]: <https://github.com/girlbossceo/ruwuma> - various performance All forked dependencies are maintained under the [continuwuation organization on Forgejo](https://forgejo.ellis.link/continuwuation):
improvements, more features, faster-paced development, better client/server interop
hacks upstream won't accept, etc - [ruwuma][continuwuation-ruwuma] - Fork of [ruma/ruma][ruma] with various performance improvements, more features and better client/server interop
- [facebook/rocksdb][2]: <https://github.com/girlbossceo/rocksdb> - liburing - [rocksdb][continuwuation-rocksdb] - Fork of [facebook/rocksdb][rocksdb] via [`@zaidoon1`][8] with liburing build fixes and GCC debug build fixes
build fixes and GCC debug build fix - [jemallocator][continuwuation-jemallocator] - Fork of [tikv/jemallocator][jemallocator] fixing musl builds, suspicious code,
- [tikv/jemallocator][3]: <https://github.com/girlbossceo/jemallocator> - musl and adding support for redzones in Valgrind
builds seem to be broken on upstream, fixes some broken/suspicious code in - [rustyline-async][continuwuation-rustyline-async] - Fork of [zyansheep/rustyline-async][rustyline-async] with tab completion callback
places, additional safety measures, and support redzones for Valgrind and `CTRL+\` signal quit event for Continuwuity console CLI
- [zyansheep/rustyline-async][4]: - [rust-rocksdb][continuwuation-rust-rocksdb] - Fork of [rust-rocksdb/rust-rocksdb][rust-rocksdb] fixing musl build issues,
<https://github.com/girlbossceo/rustyline-async> - tab completion callback and removing unnecessary `gtest` include, and using our RocksDB and jemallocator forks
`CTRL+\` signal quit event for Continuwuity console CLI - [tracing][continuwuation-tracing] - Fork of [tokio-rs/tracing][tracing] implementing `Clone` for `EnvFilter` to
- [rust-rocksdb/rust-rocksdb][5]: support dynamically changing tracing environments
<https://github.com/girlbossceo/rust-rocksdb-zaidoon1> - [`@zaidoon1`][8]'s fork
has quicker updates, more up to date dependencies, etc. Our fork fixes musl build
issues, removes unnecessary `gtest` include, and uses our RocksDB and jemallocator
forks.
- [tokio-rs/tracing][6]: <https://github.com/girlbossceo/tracing> - Implements
`Clone` for `EnvFilter` to support dynamically changing tracing envfilter's
alongside other logging/metrics things
## Debugging with `tokio-console` ## Debugging with `tokio-console`
@ -113,12 +104,30 @@ You will also need to enable the `tokio_console` config option in Continuwuity w
starting it. This was due to tokio-console causing gradual memory leak/usage starting it. This was due to tokio-console causing gradual memory leak/usage
if left enabled. if left enabled.
[1]: https://github.com/ruma/ruma/ ## Building Docker Images
[2]: https://github.com/facebook/rocksdb/
[3]: https://github.com/tikv/jemallocator/ To build a Docker image for Continuwuity, use the standard Docker build command:
[4]: https://github.com/zyansheep/rustyline-async/
[5]: https://github.com/rust-rocksdb/rust-rocksdb/ ```bash
[6]: https://github.com/tokio-rs/tracing/ docker build -f docker/Dockerfile .
```
The image can be cross-compiled for different architectures.
[continuwuation-ruwuma]: https://forgejo.ellis.link/continuwuation/ruwuma
[continuwuation-rocksdb]: https://forgejo.ellis.link/continuwuation/rocksdb
[continuwuation-jemallocator]: https://forgejo.ellis.link/continuwuation/jemallocator
[continuwuation-rustyline-async]: https://forgejo.ellis.link/continuwuation/rustyline-async
[continuwuation-rust-rocksdb]: https://forgejo.ellis.link/continuwuation/rust-rocksdb
[continuwuation-tracing]: https://forgejo.ellis.link/continuwuation/tracing
[ruma]: https://github.com/ruma/ruma/
[rocksdb]: https://github.com/facebook/rocksdb/
[jemallocator]: https://github.com/tikv/jemallocator/
[rustyline-async]: https://github.com/zyansheep/rustyline-async/
[rust-rocksdb]: https://github.com/rust-rocksdb/rust-rocksdb/
[tracing]: https://github.com/tokio-rs/tracing/
[7]: https://docs.rs/tokio-console/latest/tokio_console/ [7]: https://docs.rs/tokio-console/latest/tokio_console/
[8]: https://github.com/zaidoon1/ [8]: https://github.com/zaidoon1/
[9]: https://github.com/rust-lang/cargo/issues/12162 [9]: https://github.com/rust-lang/cargo/issues/12162

View file

@ -3,4 +3,4 @@
Content-Type: application/json Content-Type: application/json
/.well-known/continuwuity/* /.well-known/continuwuity/*
Access-Control-Allow-Origin: * Access-Control-Allow-Origin: *
Content-Type: application/json Content-Type: application/json

View file

@ -4,6 +4,10 @@
{ {
"id": 1, "id": 1,
"message": "Welcome to Continuwuity! Important announcements about the project will appear here." "message": "Welcome to Continuwuity! Important announcements about the project will appear here."
},
{
"id": 2,
"message": "🎉 Continuwuity v0.5.0-rc.6 is now available! This release includes improved knock-restricted room handling, automatic support contact configuration, and a new HTML landing page. Check [the release notes for full details](https://forgejo.ellis.link/continuwuation/continuwuity/releases/tag/v0.5.0-rc.6) and upgrade instructions."
} }
] ]
} }

View file

@ -32,4 +32,4 @@
"required": [ "required": [
"announcements" "announcements"
] ]
} }

2
docs/static/support vendored
View file

@ -21,4 +21,4 @@
} }
], ],
"support_page": "https://continuwuity.org/introduction#contact" "support_page": "https://continuwuity.org/introduction#contact"
} }

View file

@ -9,7 +9,7 @@
# If you're having trouble making the relevant changes, bug a maintainer. # If you're having trouble making the relevant changes, bug a maintainer.
[toolchain] [toolchain]
channel = "1.86.0" channel = "1.87.0"
profile = "minimal" profile = "minimal"
components = [ components = [
# For rust-analyzer # For rust-analyzer
@ -19,11 +19,3 @@ components = [
"rustfmt", "rustfmt",
"clippy", "clippy",
] ]
targets = [
#"x86_64-apple-darwin",
"x86_64-unknown-linux-gnu",
"x86_64-unknown-linux-musl",
"aarch64-unknown-linux-musl",
"aarch64-unknown-linux-gnu",
#"aarch64-apple-darwin",
]

View file

@ -9,7 +9,7 @@ use crate::{
}; };
#[derive(Debug, Parser)] #[derive(Debug, Parser)]
#[command(name = "conduwuit", version = conduwuit::version())] #[command(name = conduwuit_core::name(), version = conduwuit_core::version())]
pub(super) enum AdminCommand { pub(super) enum AdminCommand {
#[command(subcommand)] #[command(subcommand)]
/// - Commands for managing appservices /// - Commands for managing appservices

View file

@ -239,10 +239,11 @@ pub(super) async fn get_remote_pdu(
}) })
.await .await
{ {
| Err(e) => | Err(e) => {
return Err!( return Err!(
"Remote server did not have PDU or failed sending request to remote server: {e}" "Remote server did not have PDU or failed sending request to remote server: {e}"
), );
},
| Ok(response) => { | Ok(response) => {
let json: CanonicalJsonObject = let json: CanonicalJsonObject =
serde_json::from_str(response.pdu.get()).map_err(|e| { serde_json::from_str(response.pdu.get()).map_err(|e| {
@ -384,8 +385,9 @@ pub(super) async fn change_log_level(&self, filter: Option<String>, reset: bool)
.reload .reload
.reload(&old_filter_layer, Some(handles)) .reload(&old_filter_layer, Some(handles))
{ {
| Err(e) => | Err(e) => {
return Err!("Failed to modify and reload the global tracing log level: {e}"), return Err!("Failed to modify and reload the global tracing log level: {e}");
},
| Ok(()) => { | Ok(()) => {
let value = &self.services.server.config.log; let value = &self.services.server.config.log;
let out = format!("Successfully changed log level back to config value {value}"); let out = format!("Successfully changed log level back to config value {value}");
@ -408,8 +410,9 @@ pub(super) async fn change_log_level(&self, filter: Option<String>, reset: bool)
.reload(&new_filter_layer, Some(handles)) .reload(&new_filter_layer, Some(handles))
{ {
| Ok(()) => return self.write_str("Successfully changed log level").await, | Ok(()) => return self.write_str("Successfully changed log level").await,
| Err(e) => | Err(e) => {
return Err!("Failed to modify and reload the global tracing log level: {e}"), return Err!("Failed to modify and reload the global tracing log level: {e}");
},
} }
} }
@ -529,6 +532,7 @@ pub(super) async fn force_set_room_state_from_server(
&self, &self,
room_id: OwnedRoomId, room_id: OwnedRoomId,
server_name: OwnedServerName, server_name: OwnedServerName,
at_event: Option<OwnedEventId>,
) -> Result { ) -> Result {
if !self if !self
.services .services
@ -540,13 +544,18 @@ pub(super) async fn force_set_room_state_from_server(
return Err!("We are not participating in the room / we don't know about the room ID."); return Err!("We are not participating in the room / we don't know about the room ID.");
} }
let first_pdu = self let at_event_id = match at_event {
.services | Some(event_id) => event_id,
.rooms | None => self
.timeline .services
.latest_pdu_in_room(&room_id) .rooms
.await .timeline
.map_err(|_| err!(Database("Failed to find the latest PDU in database")))?; .latest_pdu_in_room(&room_id)
.await
.map_err(|_| err!(Database("Failed to find the latest PDU in database")))?
.event_id
.clone(),
};
let room_version = self.services.rooms.state.get_room_version(&room_id).await?; let room_version = self.services.rooms.state.get_room_version(&room_id).await?;
@ -557,7 +566,7 @@ pub(super) async fn force_set_room_state_from_server(
.sending .sending
.send_federation_request(&server_name, get_room_state::v1::Request { .send_federation_request(&server_name, get_room_state::v1::Request {
room_id: room_id.clone(), room_id: room_id.clone(),
event_id: first_pdu.event_id.clone(), event_id: at_event_id,
}) })
.await?; .await?;

View file

@ -177,6 +177,9 @@ pub(super) enum DebugCommand {
room_id: OwnedRoomId, room_id: OwnedRoomId,
/// The server we will use to query the room state for /// The server we will use to query the room state for
server_name: OwnedServerName, server_name: OwnedServerName,
/// The event ID of the latest known PDU in the room. Will be found
/// automatically if not provided.
event_id: Option<OwnedEventId>,
}, },
/// - Runs a server name through conduwuit's true destination resolution /// - Runs a server name through conduwuit's true destination resolution

View file

@ -121,7 +121,9 @@ where
.map(|(key, val)| (key, val.collect())) .map(|(key, val)| (key, val.collect()))
.collect(); .collect();
if !populate { if populate {
rooms.push(summary_to_chunk(summary.clone()));
} else {
children = children children = children
.iter() .iter()
.rev() .rev()
@ -144,10 +146,8 @@ where
.collect(); .collect();
} }
if populate { if !populate && queue.is_empty() && children.is_empty() {
rooms.push(summary_to_chunk(summary.clone())); break;
} else if queue.is_empty() && children.is_empty() {
return Err!(Request(InvalidParam("Room IDs in token were not found.")));
} }
parents.insert(current_room.clone()); parents.insert(current_room.clone());

View file

@ -77,7 +77,7 @@ pub(crate) fn init(
); );
let tracer = opentelemetry_jaeger::new_agent_pipeline() let tracer = opentelemetry_jaeger::new_agent_pipeline()
.with_auto_split_batch(true) .with_auto_split_batch(true)
.with_service_name("conduwuit") .with_service_name(conduwuit_core::name())
.install_batch(opentelemetry_sdk::runtime::Tokio) .install_batch(opentelemetry_sdk::runtime::Tokio)
.expect("jaeger agent pipeline"); .expect("jaeger agent pipeline");
let telemetry = tracing_opentelemetry::layer().with_tracer(tracer); let telemetry = tracing_opentelemetry::layer().with_tracer(tracer);

View file

@ -605,4 +605,3 @@ ul#searchresults span.teaser em {
margin-inline-start: -14px; margin-inline-start: -14px;
width: 14px; width: 14px;
} }