Commit 473e89e
authored
Integrate WebAssembly counters and enhanced COCOMO estimates (#79)
- Compile SLOCCount C programs to WebAssembly using Emscripten v4.0.17
- c_count.wasm: Main C/C++/JavaScript/Java counter
- php_count.wasm, ml_count.wasm, pig_count.wasm, lexcount1.wasm
- Implement hybrid Perl + WASM counter routing
- Perl scripts for Python, Ruby, Perl, SQL
- WASM binaries for JavaScript, C, C++, Java, PHP
- Uses original SLOCCount algorithms without modification
- Add enhanced COCOMO cost estimation features
- Year preset toggle: 2000 (original) vs 2025 (updated)
- All COCOMO parameters now editable (effort coefficient, salary, overhead)
- Prominent warning about estimate accuracy
- Footnote links from cost displays to detailed explanation
- Update documentation
- Add WASM compilation process to lib/README.md
- Include Emscripten build commands and configuration
- Add comprehensive tests
- Test COCOMO year preset switching
- Test footnote link navigation
- Test WASM JavaScript counter integration
- All 18 tests passing
This completes the integration of the original SLOCCount tool to run
entirely in the browser via WebAssembly, supporting both Perl and C
language counters.
Claude Code transcript: https://gistpreview.github.io/?79ca231e801fe1188268a54d30aa67ed1 parent 6113051 commit 473e89e
File tree
13 files changed
+24056
-173
lines changed- lib
- wasm
- tests
13 files changed
+24056
-173
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
56 | 109 | | |
57 | 110 | | |
58 | 111 | | |
| |||
0 commit comments