clap-compiler 0.35.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- clap_compiler-0.35.1/CHANGELOG.md +379 -0
- clap_compiler-0.35.1/CONTRIBUTING.md +45 -0
- clap_compiler-0.35.1/LICENSE +21 -0
- clap_compiler-0.35.1/MANIFEST.in +7 -0
- clap_compiler-0.35.1/PKG-INFO +330 -0
- clap_compiler-0.35.1/README.md +297 -0
- clap_compiler-0.35.1/README.ru.md +296 -0
- clap_compiler-0.35.1/SECURITY.md +20 -0
- clap_compiler-0.35.1/docs/assets/terminal-demo.svg +28 -0
- clap_compiler-0.35.1/examples/cmake/CMakeLists.txt +4 -0
- clap_compiler-0.35.1/examples/cmake/main.c +6 -0
- clap_compiler-0.35.1/examples/hello/clap.toml +4 -0
- clap_compiler-0.35.1/examples/hello/main.c +6 -0
- clap_compiler-0.35.1/examples/mixed/answer.c +3 -0
- clap_compiler-0.35.1/examples/mixed/main.cpp +8 -0
- clap_compiler-0.35.1/packaging/README.md +27 -0
- clap_compiler-0.35.1/packaging/aur/PKGBUILD +25 -0
- clap_compiler-0.35.1/packaging/debian/build-deb.sh +52 -0
- clap_compiler-0.35.1/packaging/nix/package.nix +42 -0
- clap_compiler-0.35.1/packaging/snap/snapcraft.yaml +27 -0
- clap_compiler-0.35.1/pyproject.toml +53 -0
- clap_compiler-0.35.1/setup.cfg +4 -0
- clap_compiler-0.35.1/src/clap_compiler/__init__.py +3 -0
- clap_compiler-0.35.1/src/clap_compiler/__main__.py +6 -0
- clap_compiler-0.35.1/src/clap_compiler/builder.py +1035 -0
- clap_compiler-0.35.1/src/clap_compiler/cli.py +1293 -0
- clap_compiler-0.35.1/src/clap_compiler/cmake_backend.py +411 -0
- clap_compiler-0.35.1/src/clap_compiler/diagnostics.py +35 -0
- clap_compiler-0.35.1/src/clap_compiler/models.py +36 -0
- clap_compiler-0.35.1/src/clap_compiler/project.py +243 -0
- clap_compiler-0.35.1/src/clap_compiler/sbom.py +587 -0
- clap_compiler-0.35.1/src/clap_compiler/toolchains.py +531 -0
- clap_compiler-0.35.1/src/clap_compiler.egg-info/PKG-INFO +330 -0
- clap_compiler-0.35.1/src/clap_compiler.egg-info/SOURCES.txt +37 -0
- clap_compiler-0.35.1/src/clap_compiler.egg-info/dependency_links.txt +1 -0
- clap_compiler-0.35.1/src/clap_compiler.egg-info/entry_points.txt +2 -0
- clap_compiler-0.35.1/src/clap_compiler.egg-info/requires.txt +9 -0
- clap_compiler-0.35.1/src/clap_compiler.egg-info/top_level.txt +1 -0
- clap_compiler-0.35.1/tests/test_clap.py +1726 -0
|
@@ -0,0 +1,379 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 0.35.1
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
|
|
7
|
+
- Explicit source files once again use a `clap.toml` project in the current working directory before falling back to project discovery beside those files. This preserves the established invocation pattern while still supporting direct tests of project directories from outside the project.
|
|
8
|
+
|
|
9
|
+
## 0.35.0
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
|
|
13
|
+
- `project.exclude_sources` now filters exact files or glob matches out of `project.sources`, making recursive source globs practical for projects with generated files, fixtures, or test-only sources.
|
|
14
|
+
|
|
15
|
+
## 0.34.0
|
|
16
|
+
|
|
17
|
+
### Added
|
|
18
|
+
|
|
19
|
+
- `clap test` now works for direct source files and executable `clap.toml` projects: it builds the executable, runs it, supports program arguments after `--`, and uses the program exit code as the test result. Project discovery also works when the project directory is passed from outside that directory, and default direct artifacts are written inside the project root.
|
|
20
|
+
|
|
21
|
+
## 0.33.0
|
|
22
|
+
|
|
23
|
+
### Added
|
|
24
|
+
|
|
25
|
+
- `project.sources` now supports deterministic glob patterns, including recursive `**` patterns. Duplicate matches are collapsed while preserving order, and a pattern with no matches is a clear project configuration error.
|
|
26
|
+
|
|
27
|
+
## 0.32.0
|
|
28
|
+
|
|
29
|
+
### Added
|
|
30
|
+
|
|
31
|
+
- Assembly artifacts now support the MSVC backend using documented `/FA` and `/Fa` listing options. The companion object file required by MSVC is kept in a hidden `.clap-assembly-objects` directory, and Windows native CI verifies the MSVC assembly path end to end.
|
|
32
|
+
|
|
33
|
+
## 0.31.1
|
|
34
|
+
|
|
35
|
+
### Fixed
|
|
36
|
+
|
|
37
|
+
- Shared-library builds now compile objects as position-independent code with `-fPIC` on Zig, GCC, and Clang, in both direct and Ninja modes.
|
|
38
|
+
- `python -m clap_compiler` now has the module entry point promised by the documentation.
|
|
39
|
+
|
|
40
|
+
## 0.31.0
|
|
41
|
+
|
|
42
|
+
### Added
|
|
43
|
+
|
|
44
|
+
- Preprocessed artifacts now support the MSVC backend using the documented `/P` and `/Fi` compiler options. Windows native CI verifies the MSVC preprocessing path end to end.
|
|
45
|
+
|
|
46
|
+
## 0.30.0
|
|
47
|
+
|
|
48
|
+
### Added
|
|
49
|
+
|
|
50
|
+
- `--artifact preprocess` now emits `.i` preprocessed sources for direct and Ninja builds on Zig, GCC, and Clang backends, including multi-source output directories. The MSVC backend rejects this mode explicitly rather than guessing at incompatible listing flags.
|
|
51
|
+
|
|
52
|
+
## 0.29.1
|
|
53
|
+
|
|
54
|
+
### Documentation
|
|
55
|
+
|
|
56
|
+
- Added contributor and security policies plus structured GitHub bug report, feature request, and pull request templates.
|
|
57
|
+
|
|
58
|
+
## 0.29.0
|
|
59
|
+
|
|
60
|
+
### Added
|
|
61
|
+
|
|
62
|
+
- `--artifact asm` now emits `.s` assembly files for direct and Ninja builds on Zig, GCC, and Clang backends, including multi-source output directories. The MSVC backend rejects this mode explicitly because it has no clean assembly-only compile operation.
|
|
63
|
+
|
|
64
|
+
## 0.28.0
|
|
65
|
+
|
|
66
|
+
### Added
|
|
67
|
+
|
|
68
|
+
- `release` and `debug` booleans in `clap.toml` now provide project-wide optimization defaults. CLI `--release` and `--debug` remain explicit overrides, and invalid simultaneous project defaults are rejected.
|
|
69
|
+
|
|
70
|
+
## 0.27.0
|
|
71
|
+
|
|
72
|
+
### Added
|
|
73
|
+
|
|
74
|
+
- `compile_commands` and `sbom` booleans in `clap.toml` now enable project-wide editor metadata and SPDX SBOM generation for direct builds. Explicit CLI output paths still take precedence.
|
|
75
|
+
|
|
76
|
+
## 0.26.0
|
|
77
|
+
|
|
78
|
+
### Added
|
|
79
|
+
|
|
80
|
+
- `clap build --dry-run` now constructs and reports exact direct compile/link command plans without writing output artifacts. JSON results mark dry runs with `dry_run: true`; incompatible run, Ninja, SBOM, check, and compilation database modes are rejected clearly.
|
|
81
|
+
|
|
82
|
+
## 0.25.0
|
|
83
|
+
|
|
84
|
+
### Added
|
|
85
|
+
|
|
86
|
+
- `--compile-commands-output` selects an explicit compilation database path and implies compilation database generation.
|
|
87
|
+
|
|
88
|
+
### Fixed
|
|
89
|
+
|
|
90
|
+
- `clap init` templates now use portable `warnings = true` configuration instead of hard-coded GCC-style warning flags, keeping generated projects portable to MSVC.
|
|
91
|
+
|
|
92
|
+
## 0.24.2
|
|
93
|
+
|
|
94
|
+
### Fixed
|
|
95
|
+
|
|
96
|
+
- Concurrent first-run toolchain bootstraps are now serialized with a cross-platform cache lock. A process that waited for another bootstrap revalidates the completed cache instead of downloading Zig again.
|
|
97
|
+
|
|
98
|
+
## 0.24.1
|
|
99
|
+
|
|
100
|
+
### Fixed
|
|
101
|
+
|
|
102
|
+
- Object-file artifacts now use `.obj` for Windows cross-compilation targets instead of blindly following the host OS.
|
|
103
|
+
|
|
104
|
+
### Infrastructure
|
|
105
|
+
|
|
106
|
+
- Mandatory CI now builds and inspects the Debian package draft and syntax-checks the AUR packaging draft. Windows cross smoke coverage also verifies object artifacts.
|
|
107
|
+
|
|
108
|
+
## 0.24.0
|
|
109
|
+
|
|
110
|
+
### Added
|
|
111
|
+
|
|
112
|
+
- `clap.toml` now supports project-wide `compiler`, `ninja`, and `jobs` defaults. Explicit CLI compiler and job options still take precedence.
|
|
113
|
+
|
|
114
|
+
## 0.23.0
|
|
115
|
+
|
|
116
|
+
### Added
|
|
117
|
+
|
|
118
|
+
- JSON results now expose the full ordered `commands` list for compile, link, CMake configure/build/install, and CTest steps.
|
|
119
|
+
- `--verbose` prints exact commands in human-readable direct and CMake builds.
|
|
120
|
+
|
|
121
|
+
## 0.22.0
|
|
122
|
+
|
|
123
|
+
### Added
|
|
124
|
+
|
|
125
|
+
- `--warnings` enables a portable warning set (`-Wall -Wextra` or MSVC `/W4`), and `--warnings-as-errors` maps to `-Werror` or `/WX`.
|
|
126
|
+
- `warnings` and `warnings_as_errors` are now supported in `clap.toml` for project-wide defaults.
|
|
127
|
+
|
|
128
|
+
## 0.21.0
|
|
129
|
+
|
|
130
|
+
### Added
|
|
131
|
+
|
|
132
|
+
- `clap build --check` now performs syntax-only compilation without linking or writing artifacts. Multi-file checks compile in parallel with the correct C, C++, or MSVC syntax-check mode.
|
|
133
|
+
|
|
134
|
+
## 0.20.0
|
|
135
|
+
|
|
136
|
+
### Added
|
|
137
|
+
|
|
138
|
+
- Direct builds now support portable `--sanitize` options and `sanitizers` in `clap.toml`. GCC/Clang/Zig receive `-fsanitize=...`; MSVC supports and validates `/fsanitize=address`.
|
|
139
|
+
|
|
140
|
+
## 0.19.1
|
|
141
|
+
|
|
142
|
+
### Fixed
|
|
143
|
+
|
|
144
|
+
- `clap init --template cmake` now sanitizes directory names into valid CMake project/target names when they contain spaces or punctuation.
|
|
145
|
+
|
|
146
|
+
## 0.19.0
|
|
147
|
+
|
|
148
|
+
### Changed
|
|
149
|
+
|
|
150
|
+
- Default Unix library artifacts now use conventional `lib` prefixes (`libutil.a`, `libutil.so`, `libutil.dylib`). Explicit `-o` paths are still respected exactly, and Windows names remain `util.lib`/`util.dll`.
|
|
151
|
+
- Project artifact defaults now distinguish the project name from an explicit `output` path, so library naming also works for `clap.toml` projects.
|
|
152
|
+
|
|
153
|
+
### Added
|
|
154
|
+
|
|
155
|
+
- Windows cross smoke now covers static and shared library artifacts in addition to executables.
|
|
156
|
+
|
|
157
|
+
## 0.18.0
|
|
158
|
+
|
|
159
|
+
### Added
|
|
160
|
+
|
|
161
|
+
- `clap clean --cache` now removes downloaded private compiler toolchains in addition to project build outputs, making it easy to reclaim the Zig cache when it is no longer needed.
|
|
162
|
+
|
|
163
|
+
## 0.17.1
|
|
164
|
+
|
|
165
|
+
### Fixed
|
|
166
|
+
|
|
167
|
+
- `clap.toml` now rejects unknown `[project]` keys instead of silently ignoring typos.
|
|
168
|
+
- AUR and Nix packaging drafts now point at the published 0.17.0 source archive with its real hashes.
|
|
169
|
+
|
|
170
|
+
## 0.17.0
|
|
171
|
+
|
|
172
|
+
### Added
|
|
173
|
+
|
|
174
|
+
- `python -m clap_compiler` now works like the `clap` console command.
|
|
175
|
+
- Packaging scaffolding now includes a locally validated Debian package builder plus honest AUR, Nix, and Snap drafts instead of empty placeholders.
|
|
176
|
+
|
|
177
|
+
## 0.16.1
|
|
178
|
+
|
|
179
|
+
### Fixed
|
|
180
|
+
|
|
181
|
+
- CMake cache validation now honors exact user overrides for `CMAKE_SYSTEM_NAME` and `CMAKE_SYSTEM_PROCESSOR`, avoiding repeated cache resets for manually configured cross-builds.
|
|
182
|
+
|
|
183
|
+
## 0.16.0
|
|
184
|
+
|
|
185
|
+
### Added
|
|
186
|
+
|
|
187
|
+
- Direct multi-source builds now compile translation units as separate objects in parallel. `-j`/`--jobs` is meaningful without `--ninja`, while Ninja remains the incremental backend.
|
|
188
|
+
|
|
189
|
+
## 0.15.0
|
|
190
|
+
|
|
191
|
+
### Added
|
|
192
|
+
|
|
193
|
+
- `clap.toml` now supports `artifact = "exe"`, `"object"`, `"static"`, or `"shared"` for direct projects. Command-line `--artifact` remains the explicit override.
|
|
194
|
+
|
|
195
|
+
## 0.14.0
|
|
196
|
+
|
|
197
|
+
### Added
|
|
198
|
+
|
|
199
|
+
- `clap init` now supports `--template c`, `--template cpp`, `--template mixed`, and `--template cmake` starting points while keeping strict overwrite protection.
|
|
200
|
+
|
|
201
|
+
## 0.13.0
|
|
202
|
+
|
|
203
|
+
### Added
|
|
204
|
+
|
|
205
|
+
- Direct builds can now emit `object`, `static`, and `shared` artifacts through `--artifact`, including sensible platform suffixes.
|
|
206
|
+
- Static libraries are archived through `zig ar`, MSVC `lib.exe`, or system `ar` depending on the active toolchain.
|
|
207
|
+
- Artifact builds compose with `--ninja` and keep incremental object rebuilds.
|
|
208
|
+
|
|
209
|
+
## 0.12.0
|
|
210
|
+
|
|
211
|
+
### Added
|
|
212
|
+
|
|
213
|
+
- Direct builds now support separate `--c-std` and `--cpp-std` options (plus `c_std` and `cpp_std` in `clap.toml`) so mixed C/C++ projects can use the correct language mode for every source file.
|
|
214
|
+
- Mixed MSVC builds now compile C and C++ files as separate objects before linking, making per-language flags meaningful there too.
|
|
215
|
+
|
|
216
|
+
## 0.11.0
|
|
217
|
+
|
|
218
|
+
### Added
|
|
219
|
+
|
|
220
|
+
- `clap test` now forwards `-j`/`--jobs` to CTest itself as well as the build and accepts exact repeated `--ctest-arg` arguments for filters, timeouts, and other CTest controls.
|
|
221
|
+
|
|
222
|
+
## 0.10.1
|
|
223
|
+
|
|
224
|
+
### Fixed
|
|
225
|
+
|
|
226
|
+
- `clap test` now refuses to run CTest for a non-host cross-compiled CMake target after building it, instead of failing later with confusing executable errors.
|
|
227
|
+
|
|
228
|
+
## 0.10.0
|
|
229
|
+
|
|
230
|
+
### Added
|
|
231
|
+
|
|
232
|
+
- `clap cmake --install` now runs the CMake install step after a successful build, and `--prefix` configures the installation prefix without manually writing `-DCMAKE_INSTALL_PREFIX`.
|
|
233
|
+
|
|
234
|
+
## 0.9.0
|
|
235
|
+
|
|
236
|
+
### Added
|
|
237
|
+
|
|
238
|
+
- `-j`/`--jobs` now controls parallelism for direct Ninja builds and CMake builds, including `clap test`.
|
|
239
|
+
|
|
240
|
+
## 0.8.1
|
|
241
|
+
|
|
242
|
+
### Fixed
|
|
243
|
+
|
|
244
|
+
- relative `-I`, `-L`, `/I`, and `/LIBPATH:` search paths forwarded through raw compiler/linker flags are now resolved against the invocation directory before Ninja or compilation-database generation, so they no longer break when Ninja runs from `.clap-ninja`.
|
|
245
|
+
|
|
246
|
+
## 0.8.0
|
|
247
|
+
|
|
248
|
+
### Added
|
|
249
|
+
|
|
250
|
+
- direct builds now support portable `-I`/`--include`, `-D`/`--define`, `--library`, and `--library-path` options translated to GCC/Clang/Zig or MSVC syntax;
|
|
251
|
+
- `clap.toml` supports `includes`, `defines`, `libraries`, and `library_paths` for small projects;
|
|
252
|
+
- include and library search paths are resolved to absolute paths so they work correctly when Ninja runs from its generated build directory.
|
|
253
|
+
|
|
254
|
+
## 0.7.0
|
|
255
|
+
|
|
256
|
+
### Added
|
|
257
|
+
|
|
258
|
+
- direct builds now support explicit linker-only flags through repeated `--link-flag` options and `link_flags` in `clap.toml`;
|
|
259
|
+
- Ninja and mixed-language builds keep those flags out of per-object compile commands and pass them only to the final link;
|
|
260
|
+
- SPDX dependency scanning sees both compiler and linker flags.
|
|
261
|
+
|
|
262
|
+
## 0.6.1
|
|
263
|
+
|
|
264
|
+
### Fixed
|
|
265
|
+
|
|
266
|
+
- `clap run .` now reports a clear cross-target error for CMake projects instead of trying to execute a foreign binary on the host. Linux-to-Windows CI covers this failure path.
|
|
267
|
+
|
|
268
|
+
## 0.6.0
|
|
269
|
+
|
|
270
|
+
### Added
|
|
271
|
+
|
|
272
|
+
- CMake projects now accept `--target` for Zig/Clang cross-compilation. CLAP configures the matching CMake system name and processor, propagates the target through compile and link flags, and uses static-library compiler checks so Windows executables can be built from Linux or macOS without a manual CMake toolchain file.
|
|
273
|
+
- CMake cache validation now detects target changes and reconfigures instead of mixing native and cross artifacts.
|
|
274
|
+
- Linux-to-Windows CI now smoke-tests a real CMake cross-build in addition to a direct source build.
|
|
275
|
+
|
|
276
|
+
## 0.5.0
|
|
277
|
+
|
|
278
|
+
### Added
|
|
279
|
+
|
|
280
|
+
- `clap doctor --probe` now performs real compile health checks by building minimal C and C++ programs with the selected toolchain in a temporary directory.
|
|
281
|
+
- doctor output now includes CMake, CTest, and Ninja versions alongside their paths, in both human and JSON modes.
|
|
282
|
+
|
|
283
|
+
## 0.4.9
|
|
284
|
+
|
|
285
|
+
### Fixed
|
|
286
|
+
|
|
287
|
+
- cached Zig toolchains are now validated by executing `zig version` and comparing it with the pinned version before use. Corrupt or replaced cache entries are ignored and can be bootstrapped again instead of poisoning every build.
|
|
288
|
+
|
|
289
|
+
## 0.4.8
|
|
290
|
+
|
|
291
|
+
### Fixed
|
|
292
|
+
|
|
293
|
+
- CMake build directories are now reconfigured when the selected compiler, compiler driver mode, or generator no longer matches the existing CMake cache, instead of silently reusing stale configuration. Explicit CMake compiler and generator overrides passed with `--cmake-arg` are respected.
|
|
294
|
+
|
|
295
|
+
## 0.4.7
|
|
296
|
+
|
|
297
|
+
### Added
|
|
298
|
+
|
|
299
|
+
- `clap cmake` and `clap test` now accept `--release` and `--debug`, mapping them to the standard CMake `Release` and `Debug` build types. CMake projects reached through `clap build .` or `clap run .` use the same controls.
|
|
300
|
+
|
|
301
|
+
## 0.4.6
|
|
302
|
+
|
|
303
|
+
### Fixed
|
|
304
|
+
|
|
305
|
+
- CMake executable execution, SBOM artifact checksums, and SBOM source paths now resolve File API paths relative to the correct top-level directories, including targets defined in subdirectories. SBOM file paths now use portable forward slashes on every platform.
|
|
306
|
+
|
|
307
|
+
## 0.4.5
|
|
308
|
+
|
|
309
|
+
### Added
|
|
310
|
+
|
|
311
|
+
- `clap run .` now works for CMake projects with one executable target, including `--` program arguments; multi-target projects can use `--cmake-target`.
|
|
312
|
+
|
|
313
|
+
## 0.4.4
|
|
314
|
+
|
|
315
|
+
### Added
|
|
316
|
+
|
|
317
|
+
- direct Ninja builds now use compiler dependency files and rebuild objects when included headers change.
|
|
318
|
+
|
|
319
|
+
## 0.4.3
|
|
320
|
+
|
|
321
|
+
### Added
|
|
322
|
+
|
|
323
|
+
- `clap clean` removes CLAP-generated `.clap-ninja` and CMake build directories;
|
|
324
|
+
- `clap doctor` reports resolved CMake, CTest, and Ninja paths for environment debugging.
|
|
325
|
+
|
|
326
|
+
## 0.4.2
|
|
327
|
+
|
|
328
|
+
### Added
|
|
329
|
+
|
|
330
|
+
- `clap test` configures and builds a CMake project, then runs CTest through the pinned CMake package.
|
|
331
|
+
|
|
332
|
+
## 0.4.1
|
|
333
|
+
|
|
334
|
+
### Added
|
|
335
|
+
|
|
336
|
+
- direct builds can generate `.clap-ninja/build.ninja` and compile/link through Ninja with `--ninja`, including mixed C/C++ projects;
|
|
337
|
+
- Windows CI now also smoke-tests direct MSVC compilation through Ninja;
|
|
338
|
+
- `--compile-commands` writes a clangd-compatible compilation database for direct builds, and CMake builds export one automatically.
|
|
339
|
+
|
|
340
|
+
## 0.4.0
|
|
341
|
+
|
|
342
|
+
### Added
|
|
343
|
+
|
|
344
|
+
- SPDX 2.3 SBOM generation for direct builds and CMake projects (`--sbom`);
|
|
345
|
+
- CMake File API metadata collection so target, source, artifact, and dependency data comes from CMake itself;
|
|
346
|
+
- real install/export/`find_package` CMake coverage adapted from `pr0g/cmake-examples`;
|
|
347
|
+
- Visual Studio MSVC discovery through `vswhere` with the correct `vcvars` environment, including CMake use;
|
|
348
|
+
- Windows CI smoke coverage for direct MSVC and CMake+MSVC builds.
|
|
349
|
+
|
|
350
|
+
### Fixed
|
|
351
|
+
|
|
352
|
+
- `--cmake-arg` now forwards one exact argument to CMake, so Windows paths are not mangled by POSIX shell escaping.
|
|
353
|
+
|
|
354
|
+
## 0.3.0
|
|
355
|
+
|
|
356
|
+
The first public-shaped release: CLAP is now explicitly a zero-setup C/C++ compiler frontend, not a language experiment.
|
|
357
|
+
|
|
358
|
+
### Added
|
|
359
|
+
|
|
360
|
+
- pinned Zig 0.17.1 bootstrap with SHA-256 and exact-size verification;
|
|
361
|
+
- safe archive extraction with path traversal checks;
|
|
362
|
+
- direct C, C++, and mixed C/C++ builds;
|
|
363
|
+
- `clap.toml` project configuration;
|
|
364
|
+
- `doctor`, `bootstrap`, and `init` commands;
|
|
365
|
+
- CMake project support through pinned Python `cmake` and `ninja` packages;
|
|
366
|
+
- structured `--json` output for editors and automation;
|
|
367
|
+
- Windows, Linux, and macOS CI, including Windows native and cross-compile smoke tests;
|
|
368
|
+
- bilingual documentation, runnable examples, and release packaging workflow.
|
|
369
|
+
|
|
370
|
+
### Fixed
|
|
371
|
+
|
|
372
|
+
- C sources are no longer compiled as C++ when a system compiler is used;
|
|
373
|
+
- relative executables now run correctly on Linux and macOS;
|
|
374
|
+
- Windows outputs receive `.exe` where appropriate;
|
|
375
|
+
- Windows fallback prefers GNU compilers before a potentially mismatched Clang/MSVC installation.
|
|
376
|
+
|
|
377
|
+
## Before 0.3.0
|
|
378
|
+
|
|
379
|
+
The repository contained a very small proof of concept and a short-lived `.clap` syntax experiment. That direction was removed: CLAP is a compiler frontend, not another programming language.
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# Contributing to CLAP
|
|
2
|
+
|
|
3
|
+
CLAP is small on purpose. The best contributions keep that feeling intact: a person installs one Python package, types `clap run main.c`, and does not have to care which compiler had to appear underneath.
|
|
4
|
+
|
|
5
|
+
## Ground rules
|
|
6
|
+
|
|
7
|
+
- CLAP is a zero-setup C/C++ compiler frontend. It is not a new C-like language.
|
|
8
|
+
- Toolchain downloads must be pinned and verified. No surprise “latest” binaries.
|
|
9
|
+
- Features need real behavior behind them: parser support, tests, documentation, and preferably CI coverage.
|
|
10
|
+
- Windows is a first-class target, not an afterthought. Think about MSVC, paths with spaces, `.exe` suffixes, and cross-compilation.
|
|
11
|
+
- Do not claim PyPI, npm, Snap, Debian, AUR, or Nix packages are published until they actually are.
|
|
12
|
+
|
|
13
|
+
## Local development
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
python -m pip install -e '.[dev]'
|
|
17
|
+
python -m ruff check src tests
|
|
18
|
+
python -m pytest -q
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Useful smoke checks:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
clap run examples/hello.c --system --offline
|
|
25
|
+
clap build examples/hello.c --system --offline --ninja
|
|
26
|
+
clap build examples/hello.c --system --offline --dry-run --json
|
|
27
|
+
clap doctor --probe
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Pull requests
|
|
31
|
+
|
|
32
|
+
Keep commits readable and scoped. A good PR usually does one thing: implement the behavior, add tests, update documentation, then prepare the release metadata. If CI is red, say why in the PR instead of hiding it.
|
|
33
|
+
|
|
34
|
+
Do not force-push over someone else's review without a reason. Rebase onto `main` before merge and delete the topic branch afterward.
|
|
35
|
+
|
|
36
|
+
## Reporting bugs
|
|
37
|
+
|
|
38
|
+
Include the command you ran, the operating system, whether you used `--system` or the private Zig toolchain, and the JSON output when possible:
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
clap build main.c --json
|
|
42
|
+
clap doctor --json --probe
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
That output is deliberately machine-readable. Paste the important parts; no need to dump hundreds of lines of compiler noise.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 CLAP contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|