Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
89 changes: 13 additions & 76 deletions .clangd.template
Original file line number Diff line number Diff line change
@@ -1,88 +1,25 @@
# .clangd configuration template for MSVC projects
#
# This file should be placed in the root of your project directory,
# next to compile_commands.json
# Optional clangd configuration for MSVC projects.
#
# Generated by ms2cc for use with clangd and MSVC compile_commands.json
# See: https://clangd.llvm.org/config for full documentation
# ms2cc preserves the evaluated compiler command. Start without removals:
# current clangd versions strip output flags themselves and understand
# clang-cl-style PCH options.

Diagnostics:
# Suppress common MSVC-related warnings that are noisy in clangd
Suppress:
- ignored-pragmas # MSVC-specific #pragma optimize, etc.
- missing-field-initializers # Common in MSVC codebases using aggregate init
- unused-const-variable # Often intentional in headers
- null-pointer-subtraction # Used in some low-level code patterns
- ignored-qualifiers # const on return types (old MSVC pattern)
- unused-but-set-variable # Debug/retail conditional code

# Don't report unused includes - too noisy for large MSVC projects
UnusedIncludes: None

# Don't report missing includes
MissingIncludes: None

# Uncomment to suppress clang-tidy checks:
# Diagnostics:
# ClangTidy:
# Remove: ['modernize-*', 'readability-*']

# The compile_commands.json generated by ms2cc already contains
# correctly formatted flags for clang-cl. clangd will automatically
# use --driver-mode=cl when it sees MSVC-style flags.
#
# Uncomment to add or remove compiler flags if needed:
CompileFlags:
Add:
# - "-std=c++20"
- "-ferror-limit=0" # No limit
- "-fdelayed-template-parsing" # MSVC-style template parsing
- "-fms-compatibility" # Enable MSVC compatibility
- "-fms-extensions" # Enable MSVC extensions
# Remove:
# - "/some-problematic-flag"

# For large codebases, you may want to tune indexing performance.
# Uncomment and adjust as needed:
# Index:
# Background: 2 # Limit background indexing threads (default: 4)
# StandardLibrary: No # Don't index STL (faster startup)
- -ferror-limit=0

Hover:
ShowAKA: Yes # Show type aliases and "also known as" info

InlayHints:
Enabled: Yes # Enable inline parameter and type hints
ParameterNames: Yes # Show parameter names inline
DeducedTypes: Yes # Show deduced types inline
# Note: Disable these if you find inline hints distracting

# ============================================================================
# Per-file or per-directory overrides
# ============================================================================
# You can add additional YAML documents below (separated by '---')
# to override settings for specific files or directories.
# If clangd reports that a specific MSVC-generated PCH is incompatible, scope a
# removal rule to affected files. Verify first that the PCH header is included
# directly or through /FI; /Yu<header> can imply inclusion.
#
# Example: Suppress warnings in test files
# ---
# If:
# PathMatch: .*test.*
# Diagnostics:
# Suppress:
# - unused-parameter
#
# Example: Add flags for specific directory
# ---
# If:
# PathMatch: src/SpecificModule/.*
# PathMatch: path/to/affected/files/.*
# CompileFlags:
# Add:
# - "-DMODULE_SPECIFIC_FLAG"
#
# Example: Suppress MSVC-specific __m128i union access errors
# ---
# If:
# PathMatch: .*ClMulCrcSSE\.cpp
# Diagnostics:
# Suppress:
# - typecheck_member_reference_struct_union
# Remove:
# - /Yc*
# - /Yu*
# - /Fp*
24 changes: 24 additions & 0 deletions .github/workflows/windows-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Windows CI

on:
push:
pull_request:

permissions:
contents: read

jobs:
test:
runs-on: windows-latest
steps:
- uses: actions/checkout@v7
- name: Set up Rust
uses: dtolnay/rust-toolchain@stable
with:
components: clippy,rustfmt
- name: Check formatting
run: cargo fmt --check
- name: Lint
run: cargo clippy --all-targets -- -D warnings
- name: Test
run: cargo test
4 changes: 3 additions & 1 deletion .github/workflows/windows-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v5
uses: actions/checkout@v7
with:
fetch-depth: 0
fetch-tags: true
Expand All @@ -33,6 +33,8 @@ jobs:
}
"version=$cargoVersion" | Out-File -FilePath $env:GITHUB_OUTPUT -Encoding utf8 -Append
- name: Build project
run: cargo test --release
- name: Build release artifact
run: cargo build --release --target x86_64-pc-windows-msvc
- name: Zip executable
run: |
Expand Down
Loading