@@ -1,6 +1,6 @@
|
||||
# Modulus
|
||||
|
||||
Modulus is the shared C++23 foundation library and build tooling used by the khodo Product Vamp repositories. It provides small runtime utilities, Conan profiles, CMake package integration, editor templates, typed LSP compile-database setup, and bridge targets for the external libraries needed by Product Vamp.
|
||||
Modulus is the shared C++23 foundation library and build tooling used by the khodo Product Vamp repositories. It provides small runtime utilities, Conan profiles, CMake package integration, editor configuration generation, typed LSP compile-database setup, and bridge targets for the external libraries needed by Product Vamp.
|
||||
|
||||
The core `modulus::modulus` target requires only Boost.JSON. Optional bridges are loaded when requested:
|
||||
|
||||
@@ -35,6 +35,29 @@ Refresh clangd compile databases with:
|
||||
|
||||
Product repos can add typed extra CMake compile databases under `tooling.lsp.compile_databases`; this is intended for cases like Product Vamp's Pico firmware tree.
|
||||
|
||||
## Editor Configuration
|
||||
|
||||
`modulus.json` is the source for generated `.clangd`, `.clang-format`, and `pyrightconfig.json` files. Configure, LSP refresh, and tooling export regenerate them only when their content changes. Keep these generated files ignored; customize `tooling.editor` instead:
|
||||
|
||||
```json
|
||||
{
|
||||
"tooling": {
|
||||
"editor": {
|
||||
"clangd": [
|
||||
{"CompileFlags": {"CompilationDatabase": "build/native"}},
|
||||
{"If": {"PathMatch": "src/firmware/.*"}, "CompileFlags": {"CompilationDatabase": "build/firmware"}}
|
||||
],
|
||||
"clang_format": {"DisableFormat": true},
|
||||
"pyright": {"include": ["tools", "conanfile.py"]}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Each supplied entry replaces that file's entire configuration. Omitted entries use Modulus defaults: the default target's build directory for clangd, `-Wall`/`-Wextra`, disabled clang-tidy and formatting, and Python paths for the bootstrap, recipe, and exported tools. Entries use the editors' own configuration keys. LLVM files use JSON-compatible YAML, with separate documents for clangd fragments.
|
||||
|
||||
The authored `cmake/` directory belongs in Git. `CMakeFiles/`, compiler caches, and generated sources belong in build directories. Modulus rejects project/source-root output directories before clearing configure or LSP caches. Conan may still use its own isolated build folders. Existing build caches are retained; they are not source files.
|
||||
|
||||
## Package
|
||||
|
||||
Create Conan packages with:
|
||||
|
||||
Reference in New Issue
Block a user