Migrate Discord backend to concord; switch to Meson + LLVM toolchain #1

Merged
drawblank merged 1 commit from concord-migration into main 2026-09-23 13:48:22 +00:00
Owner

Summary

Migrate the Discord backend from the in-tree lib/libdiscord to concord (vendored as a git submodule at lib/concord, pinned to the dev branch), and switch the build system from CMake to Meson with an LLVM toolchain.

Changes

  • Discord: rewrote client_discord.c against concord's typed API; emoji/guild sync moved into on_ready via async REST callbacks; invite URL now resolved from the READY event.
  • Build: CMake → Meson (bootstrapped with meson init, plus a custom target that builds concord via its Makefile); native.ini pins clang, mold, and LLVM binutils.
  • Tooling: justfile (lint/format/build), .clang-format, .clang-tidy.
  • Refactor: shared src/util.{c,h}; removed duplicated helpers across sources.
  • Hash: replaced the hand-rolled base62 SHA encoding with EVP_Q_digest + lowercase hex.
  • Fixes: clang-tidy findings (realloc/stream leaks, enum range, tainted index).

Verification

  • ninja -C build → 0 warnings (clang + mold)
  • clang-tidy -p build src/*.c → 0 findings in src/
## Summary Migrate the Discord backend from the in-tree `lib/libdiscord` to [concord](https://github.com/Cogmasters/concord) (vendored as a git submodule at `lib/concord`, pinned to the `dev` branch), and switch the build system from CMake to Meson with an LLVM toolchain. ## Changes - **Discord**: rewrote `client_discord.c` against concord's typed API; emoji/guild sync moved into `on_ready` via async REST callbacks; invite URL now resolved from the `READY` event. - **Build**: CMake → Meson (bootstrapped with `meson init`, plus a custom target that builds concord via its Makefile); `native.ini` pins clang, mold, and LLVM binutils. - **Tooling**: `justfile` (`lint`/`format`/`build`), `.clang-format`, `.clang-tidy`. - **Refactor**: shared `src/util.{c,h}`; removed duplicated helpers across sources. - **Hash**: replaced the hand-rolled base62 SHA encoding with `EVP_Q_digest` + lowercase hex. - **Fixes**: clang-tidy findings (realloc/stream leaks, enum range, tainted index). ## Verification - `ninja -C build` → 0 warnings (clang + mold) - `clang-tidy -p build src/*.c` → 0 findings in `src/`
- Replace vendored lib/libdiscord with lib/concord (git submodule, dev branch)
- Rewrite the Discord adapter against concord's typed API; move emoji/guild
  sync into on_ready via async REST callbacks
- Switch the build system from CMake to Meson (bootstrapped with meson init)
- Add native.ini for the LLVM toolchain (clang, mold, llvm binutils)
- Add justfile (lint/format/build) plus .clang-format and .clang-tidy configs
- Extract shared helpers into src/util.{c,h}; drop duplicated code
- Replace hand-rolled base62 SHA hashing with EVP_Q_digest + lowercase hex
- Fix clang-tidy findings (realloc/stream leaks, enum range, tainted index)
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
slopnode/bridge!1
No description provided.