Skip to content

Commit ca82acf

Browse files
authored
Merge pull request #66 from meta-graph/release/v0.1.1
Release/v0.1.1
2 parents 4e5e5aa + 2e81b40 commit ca82acf

File tree

88 files changed

+7615
-4116
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

88 files changed

+7615
-4116
lines changed

.clang-tidy

Lines changed: 28 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,18 @@
1-
# HyperDAG clang-tidy Configuration
1+
# MetaGraph clang-tidy Configuration
22
# EXTREME quality standards - ALL warnings are errors
33

44
# Enable comprehensive check coverage
5-
Checks: '
6-
*,
7-
-abseil-*,
8-
-altera-*,
9-
-android-*,
10-
-darwin-*,
11-
-fuchsia-*,
12-
-google-build-using-namespace,
13-
-google-readability-avoid-underscore-in-googletest-name,
14-
-google-readability-todo,
15-
-hicpp-named-parameter,
16-
-hicpp-no-array-decay,
17-
-hicpp-signed-bitwise,
18-
-llvm-header-guard,
19-
-llvmlibc-*,
20-
-modernize-use-trailing-return-type,
21-
-readability-identifier-length,
22-
-zircon-*
23-
'
5+
Checks: >
6+
-*,
7+
bugprone-*,
8+
cert-*,
9+
clang-analyzer-*,
10+
concurrency-*,
11+
misc-*,
12+
performance-*,
13+
portability-*,
14+
readability-*,
15+
-readability-magic-numbers
2416
2517
# ALL warnings become compilation errors - zero tolerance
2618
WarningsAsErrors: '*'
@@ -30,7 +22,7 @@ HeaderFilterRegex: '(include|src)/.*\.(h|c)$'
3022

3123
# Check configuration
3224
CheckOptions:
33-
# Naming conventions for HyperDAG
25+
# Naming conventions for MetaGraph
3426
- key: readability-identifier-naming.TypedefCase
3527
value: lower_case
3628
- key: readability-identifier-naming.TypedefSuffix
@@ -44,27 +36,27 @@ CheckOptions:
4436
- key: readability-identifier-naming.EnumConstantCase
4537
value: UPPER_CASE
4638
- key: readability-identifier-naming.EnumConstantPrefix
47-
value: 'HYPERDAG_'
39+
value: 'METAGRAPH_'
4840
- key: readability-identifier-naming.FunctionCase
4941
value: lower_case
5042
- key: readability-identifier-naming.FunctionPrefix
51-
value: 'hyperdag_'
43+
value: 'metagraph_'
5244
- key: readability-identifier-naming.VariableCase
5345
value: lower_case
5446
- key: readability-identifier-naming.ParameterCase
5547
value: lower_case
5648
- key: readability-identifier-naming.MacroDefinitionCase
5749
value: UPPER_CASE
5850
- key: readability-identifier-naming.MacroDefinitionPrefix
59-
value: 'HYPERDAG_'
51+
value: 'METAGRAPH_'
6052
- key: readability-identifier-naming.GlobalConstantCase
6153
value: UPPER_CASE
6254
- key: readability-identifier-naming.GlobalConstantPrefix
63-
value: 'HYPERDAG_'
64-
55+
value: 'METAGRAPH_'
56+
6557
# Function complexity limits
6658
- key: readability-function-cognitive-complexity.Threshold
67-
value: '15'
59+
value: '25'
6860
- key: readability-function-size.LineThreshold
6961
value: '50'
7062
- key: readability-function-size.StatementThreshold
@@ -74,34 +66,34 @@ CheckOptions:
7466
- key: readability-function-size.ParameterThreshold
7567
value: '6'
7668
- key: readability-function-size.NestingThreshold
77-
value: '4'
78-
69+
value: '5'
70+
7971
# Memory safety
8072
- key: bugprone-suspicious-string-compare.WarnOnImplicitComparison
8173
value: true
8274
- key: bugprone-suspicious-string-compare.WarnOnLogicalNotComparison
8375
value: true
8476
- key: cert-err33-c.CheckedFunctions
8577
value: '::aligned_alloc;::calloc;::clock;::fclose;::ferror;::fflush;::fgetc;::fgetpos;::fgets;::fgetwc;::fopen;::fprintf;::fputc;::fputs;::fputwc;::fread;::freopen;::fscanf;::fseek;::fsetpos;::ftell;::fwprintf;::fwrite;::fwscanf;::getc;::getchar;::gets;::getwc;::getwchar;::gmtime;::localtime;::malloc;::mbrtowc;::mbsrtowcs;::mbstowcs;::memchr;::mktime;::printf;::putc;::putchar;::puts;::putwc;::putwchar;::raise;::realloc;::remove;::rename;::scanf;::setlocale;::setvbuf;::signal;::snprintf;::sprintf;::sscanf;::strchr;::strerror_s;::strftime;::strpbrk;::strrchr;::strstr;::strtod;::strtof;::strtoimax;::strtok;::strtol;::strtoll;::strtoul;::strtoull;::strtoumax;::strxfrm;::swprintf;::swscanf;::time;::tmpfile;::tmpnam;::ungetc;::ungetwc;::vfprintf;::vfscanf;::vfwprintf;::vfwscanf;::vprintf;::vscanf;::vsnprintf;::vsprintf;::vsscanf;::vswprintf;::vswscanf;::vwprintf;::vwscanf;::wcrtomb;::wcschr;::wcsftime;::wcspbrk;::wcsrchr;::wcsrtombs;::wcsstr;::wcstod;::wcstof;::wcstoimax;::wcstok;::wcstol;::wcstoll;::wcstombs;::wcstoul;::wcstoull;::wcstoumax;::wcsxfrm;::wctob;::wmemchr;::wprintf;::wscanf'
86-
78+
8779
# Performance
8880
- key: performance-move-const-arg.CheckTriviallyCopyableMove
8981
value: false
9082
- key: performance-no-automatic-move.AllowedTypes
9183
value: ''
92-
84+
9385
# Modernize to C23
9486
- key: modernize-replace-auto-ptr.IncludeStyle
9587
value: google
9688
- key: modernize-use-auto.MinTypeNameLength
9789
value: '5'
9890
- key: modernize-use-auto.RemoveStars
9991
value: false
100-
92+
10193
# Portability
10294
- key: portability-restrict-system-includes.Includes
10395
value: '*'
104-
96+
10597
# Thread safety
10698
- key: misc-misplaced-const.CheckPrimitiveCasts
10799
value: true
@@ -113,13 +105,8 @@ SystemHeaders: false
113105
UseColor: true
114106

115107
# Enable all available experimental checks
116-
ExtraArgs:
117-
- '-std=c23'
118-
- '-Wextra'
119-
- '-Wall'
120-
- '-Wpedantic'
121-
- '-Wno-unused-parameter' # Common in function pointer interfaces
122-
- '-Wno-gnu-zero-variadic-macro-arguments' # Allow empty __VA_ARGS__
108+
# Note: When using compilation database, extra args should be passed via command line
109+
# to avoid being interpreted as file paths
123110

124111
# Performance: run checks in parallel
125-
# Parallel: true # Not supported in this clang-tidy version
112+
# Parallel: true # Not supported in this clang-tidy version

.devcontainer/devcontainer.json

Lines changed: 42 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -1,63 +1,44 @@
11
{
2-
"name": "HyperDAG C23 Development",
3-
"image": "silkeh/clang:18",
4-
5-
"features": {
6-
"ghcr.io/devcontainers/features/cmake:1": {
7-
"version": "latest"
2+
"name": "MetaGraph C23 Development",
3+
"build": {
4+
"dockerfile": "../Dockerfile.dev",
5+
"context": "."
6+
},
7+
"features": {},
8+
"customizations": {
9+
"vscode": {
10+
"extensions": [
11+
"ms-vscode.cpptools",
12+
"ms-vscode.cpptools-extension-pack",
13+
"ms-vscode.cmake-tools",
14+
"twxs.cmake",
15+
"notskm.clang-tidy",
16+
"xaver.clang-format",
17+
"eamodio.gitlens",
18+
"editorconfig.editorconfig",
19+
"vadimcn.vscode-lldb",
20+
"cschlosser.doxdocgen",
21+
"ms-azuretools.vscode-docker"
22+
],
23+
"settings": {
24+
"C_Cpp.default.cStandard": "c23",
25+
"C_Cpp.default.compilerPath": "/usr/bin/clang",
26+
"C_Cpp.default.intelliSenseMode": "linux-clang-x64",
27+
"cmake.configureSettings": {
28+
"CMAKE_BUILD_TYPE": "Debug",
29+
"METAGRAPH_DEV": "ON",
30+
"METAGRAPH_SANITIZERS": "ON",
31+
"CMAKE_C_COMPILER": "/usr/bin/clang"
832
},
9-
"ghcr.io/devcontainers/features/git:1": {
10-
"version": "latest"
11-
}
12-
},
13-
14-
"postCreateCommand": "./scripts/setup-dev-env.sh --skip-vscode",
15-
16-
"customizations": {
17-
"vscode": {
18-
"extensions": [
19-
"ms-vscode.cpptools",
20-
"ms-vscode.cpptools-extension-pack",
21-
"ms-vscode.cmake-tools",
22-
"twxs.cmake",
23-
"notskm.clang-tidy",
24-
"xaver.clang-format",
25-
"eamodio.gitlens",
26-
"editorconfig.editorconfig",
27-
"vadimcn.vscode-lldb",
28-
"cschlosser.doxdocgen",
29-
"ms-azuretools.vscode-docker"
30-
],
31-
"settings": {
32-
"C_Cpp.default.cStandard": "c23",
33-
"C_Cpp.default.compilerPath": "/usr/bin/clang",
34-
"C_Cpp.default.intelliSenseMode": "linux-clang-x64",
35-
"cmake.configureSettings": {
36-
"CMAKE_BUILD_TYPE": "Debug",
37-
"HYPERDAG_DEV": "ON",
38-
"HYPERDAG_SANITIZERS": "ON",
39-
"CMAKE_C_COMPILER": "/usr/bin/clang"
40-
},
41-
"terminal.integrated.defaultProfile.linux": "bash"
42-
}
43-
}
44-
},
45-
46-
"mounts": [
47-
"source=${localWorkspaceFolder}/.git,target=/workspace/.git,type=bind,consistency=cached"
48-
],
49-
50-
"workspaceFolder": "/workspace",
51-
"workspaceMount": "source=${localWorkspaceFolder},target=/workspace,type=bind,consistency=cached",
52-
53-
"forwardPorts": [],
54-
55-
"containerEnv": {
56-
"ASAN_OPTIONS": "abort_on_error=1:halt_on_error=1:print_stats=1",
57-
"UBSAN_OPTIONS": "abort_on_error=1:halt_on_error=1:print_stacktrace=1",
58-
"CC": "clang",
59-
"CXX": "clang++"
60-
},
61-
62-
"remoteUser": "root"
63-
}
33+
"terminal.integrated.defaultProfile.linux": "bash"
34+
}
35+
}
36+
},
37+
"containerEnv": {
38+
"ASAN_OPTIONS": "abort_on_error=1:halt_on_error=1:print_stats=1",
39+
"UBSAN_OPTIONS": "abort_on_error=1:halt_on_error=1:print_stacktrace=1",
40+
"CC": "clang",
41+
"CXX": "clang++"
42+
},
43+
"remoteUser": "root"
44+
}

.github/CODEOWNERS

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# MetaGraph Code Owners
2+
# These owners will be automatically requested for review when someone
3+
# opens a pull request modifying the matching files.
4+
5+
# Global owners (fallback)
6+
* @meta-graph/maintainers
7+
8+
# Core library
9+
/src/ @meta-graph/core-team
10+
/include/ @meta-graph/core-team
11+
/tests/ @meta-graph/core-team
12+
13+
# Build system
14+
/CMakeLists.txt @meta-graph/build-team
15+
/cmake/ @meta-graph/build-team
16+
*.cmake @meta-graph/build-team
17+
18+
# Documentation
19+
/docs/ @meta-graph/docs-team
20+
*.md @meta-graph/docs-team
21+
/CONTRIBUTING.md @meta-graph/maintainers
22+
/SECURITY.md @meta-graph/security-team
23+
24+
# Scripts and tooling
25+
/scripts/ @meta-graph/devops-team
26+
/.github/ @meta-graph/devops-team
27+
/docker/ @meta-graph/devops-team
28+
29+
# Security-critical files
30+
/src/crypto/ @meta-graph/security-team
31+
/src/validation/ @meta-graph/security-team
32+
/scripts/security-audit.sh @meta-graph/security-team
33+
34+
# Release process
35+
/scripts/prepare-release.sh @meta-graph/maintainers
36+
/scripts/cut-release.sh @meta-graph/maintainers
37+
/docs/RELEASE.md @meta-graph/maintainers
38+
39+
# Third-party dependencies
40+
/docs/3rd-party.md @meta-graph/maintainers
41+
/cmake/ThirdPartyDependencies.cmake @meta-graph/maintainers
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: 'Setup Build Environment'
2+
description: 'Setup consistent build environment across platforms'
3+
inputs:
4+
os:
5+
description: 'Operating system'
6+
required: true
7+
8+
runs:
9+
using: 'composite'
10+
steps:
11+
- name: Setup Windows
12+
if: inputs.os == 'Windows'
13+
shell: bash
14+
run: |
15+
choco install cmake ninja llvm --version=18.0.0 -y
16+
echo "C:\Program Files\LLVM\bin" >> $GITHUB_PATH
17+
18+
- name: Setup Linux
19+
if: inputs.os == 'Linux'
20+
shell: bash
21+
run: |
22+
wget https://apt.llvm.org/llvm.sh
23+
chmod +x llvm.sh
24+
sudo ./llvm.sh 18
25+
sudo apt-get update
26+
sudo apt-get install -y \
27+
cmake ninja-build \
28+
clang-18 clang-tidy-18 clang-format-18 \
29+
libssl-dev
30+
31+
- name: Setup macOS
32+
if: inputs.os == 'macOS'
33+
shell: bash
34+
run: |
35+
brew update
36+
brew install cmake ninja llvm@18
37+
echo "/opt/homebrew/opt/llvm@18/bin" >> $GITHUB_PATH
38+
echo "/usr/local/opt/llvm@18/bin" >> $GITHUB_PATH
39+
40+
- name: Verify tools
41+
shell: bash
42+
run: |
43+
echo "Tool versions:"
44+
cmake --version
45+
ninja --version
46+
clang --version || clang-18 --version
47+
echo "Build environment ready!"

0 commit comments

Comments
 (0)