measur-tools-suite 1.0.13-beta.134 → 1.0.13-beta.136

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.
package/BUILD.md CHANGED
@@ -76,18 +76,20 @@ Install only what you need for the scenario you plan to use.
76
76
  Mutually influential behavior:
77
77
  - When `BUILD_WASM=ON` the build disables `BUILD_TESTING` & `BUILD_PACKAGE` internally (see `CMakeLists.txt`). Toggle intentionally—do not expect tests with WASM in a single configure.
78
78
 
79
+ > **Tip:** Use dedicated build directories (for example, `build-cpp` and `build-wasm`) instead of reconfiguring the same directory when you switch scenarios. This avoids stale cache entries and conflicting options.
80
+
79
81
  ---
80
82
 
81
83
  ## 5. Common Build Scenarios
82
84
 
83
- | Scenario | Commands (summary) |
84
- | ---------------------------- | ------------------------------------------------------------------------------------------------------------------- |
85
- | Standard C++ (library + CLI) | `mkdir build-cpp && cd build-cpp && cmake .. && cmake --build .` |
86
- | C++ Tests | (after standard build) run `./bin/cpp_tests` (Linux/macOS) or `./cpp_tests` inside `Debug/` or `Release/` (Windows) |
87
- | WASM Module | `emcmake cmake -DBUILD_WASM=ON ..` then `emmake make` |
88
- | WASM Tests (browser) | `npm install && npm run test:browser` |
89
- | Documentation | `doxygen Doxyfile` |
90
- | Package | `cmake -DBUILD_PACKAGE=ON -DBUILD_TESTING=OFF .. && cmake --build . --target package` |
85
+ | Scenario | Commands (summary) |
86
+ | ---------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
87
+ | Standard C++ (library + CLI) | `cmake -S . -B build-cpp && cmake --build build-cpp` (Windows: add `--config Release` or desired configuration) |
88
+ | C++ Tests | (after standard build) run `./build-cpp/bin/cpp_tests` (Linux/macOS) or `./build-cpp/Debug/cpp_tests.exe` (Windows; use `Release/` as needed) |
89
+ | WASM Module | `emcmake cmake -S . -B build-wasm -DBUILD_WASM=ON` then `emmake make -C build-wasm` |
90
+ | WASM Tests (browser) | `npm install && npm run test:browser` |
91
+ | Documentation | `doxygen Doxyfile` |
92
+ | Package | `cmake -S . -B build-pkg -DBUILD_PACKAGE=ON -DBUILD_TESTING=OFF && cmake --build build-pkg --target package` |
91
93
 
92
94
  ---
93
95
 
@@ -98,33 +100,31 @@ Mutually influential behavior:
98
100
  ```bash
99
101
  git clone <repo-url> MEASUR-Tools-Suite
100
102
  cd MEASUR-Tools-Suite
101
- mkdir build-cpp
102
- cd build-cpp
103
- cmake .. # add -G "Ninja" or other generator if desired
104
- cmake --build . # builds library + CLI + tests (if enabled)
103
+ cmake -S . -B build-cpp # add -G "Ninja" or other generator if desired
104
+ cmake --build build-cpp # builds library + CLI + tests (if enabled)
105
105
  ```
106
- Artifacts:
107
- - Library: `build-cpp/lib/libmeasur_tools_suite.a` (Linux/macOS) or `.lib` (Windows)
108
- - CLI executable: `build-cpp/bin/measur_tools_suite` (Linux/macOS) or `measur_tools_suite.exe` (Windows under `Debug/` or `Release/` if multi-config)
106
+ (On Windows multi-config generators (e.g., Visual Studio), specify a configuration: `cmake --build build-cpp --config Release` (or `Debug`).)
107
+
108
+ Artifacts appear under `build-cpp/bin/` or on Windows `build-cpp/Debug/` or `build-cpp/Release/`.
109
109
 
110
110
  ### 6.2 Running the CLI
111
111
 
112
112
  ```bash
113
- ./bin/measur_tools_suite --help
113
+ ./build-cpp/bin/measur_tools_suite --help
114
114
  ```
115
- (Adjust path for Windows: `./Debug/measur_tools_suite.exe` or `./Release/measur_tools_suite.exe`.)
115
+ (Adjust path for Windows: `./build-cpp/Debug/measur_tools_suite.exe` or `./build-cpp/Release/measur_tools_suite.exe`.)
116
116
 
117
117
  ### 6.3 C++ Unit Tests
118
118
 
119
119
  If `BUILD_TESTING=ON` (default in non-WASM builds):
120
120
  ```bash
121
- cd build-cpp/bin
122
- ./cpp_tests
121
+ ./build-cpp/bin/cpp_tests
123
122
  ```
124
123
  Windows (multi-config):
125
124
  ```bash
126
- cd build-cpp/Debug
127
- ./cpp_tests.exe
125
+ ./build-cpp/Debug/cpp_tests.exe
126
+ # or
127
+ ./build-cpp/Release/cpp_tests.exe
128
128
  ```
129
129
 
130
130
  ### 6.4 WebAssembly Build
@@ -171,15 +171,13 @@ emcc --version # should show Emscripten version
171
171
 
172
172
  With emsdk activated, configure and build:
173
173
  ```bash
174
- mkdir build-wasm
175
- cd build-wasm
176
- emcmake cmake -DBUILD_WASM=ON ..
177
- emmake make
174
+ emcmake cmake -S . -B build-wasm -DBUILD_WASM=ON
175
+ emmake make -C build-wasm
176
+ ```
177
+ Artifacts appear under `build-wasm/bin/`. Copy them to `bin/` for standard access:
178
+ ```bash
179
+ cp -a build-wasm/bin ./bin
178
180
  ```
179
-
180
- Artifacts appear under `build-wasm/bin/`:
181
- - `client.js` (glue / loader)
182
- - `client.wasm` (compiled module)
183
181
 
184
182
  ### 6.5 WebAssembly Usage Example
185
183
 
@@ -203,7 +201,7 @@ Run from repository root (uses mocha):
203
201
  npm install
204
202
  npm run test:browser
205
203
  ```
206
- Mocha tests reside in `tests/wasm-mocha/`. Re-running tests after editing JS/WASM test files does not require a rebuild unless C++ sources changed.
204
+ Mocha tests reside in `tests/wasm-mocha/`. Re-running tests after editing JS/WASM test files does not require a rebuild unless C++ sources changed. Rerun `npm install` only when dependencies change or the lockfile updates.
207
205
 
208
206
  ### 6.7 Documentation Generation
209
207
 
@@ -216,13 +214,12 @@ Output: `docs/html/index.html`.
216
214
 
217
215
  Single-config (Linux/macOS):
218
216
  ```bash
219
- mkdir build-pkg && cd build-pkg
220
- cmake -DBUILD_PACKAGE=ON -DBUILD_TESTING=OFF ..
221
- cmake --build . --target package
217
+ cmake -S . -B build-pkg -DBUILD_PACKAGE=ON -DBUILD_TESTING=OFF
218
+ cmake --build build-pkg --target package
222
219
  ```
223
220
  Windows (multi-config):
224
221
  ```bash
225
- cmake -B build-pkg -DBUILD_PACKAGE=ON -DBUILD_TESTING=OFF .
222
+ cmake -S . -B build-pkg -DBUILD_PACKAGE=ON -DBUILD_TESTING=OFF
226
223
  cmake --build build-pkg --config Release --target package
227
224
  ```
228
225
  Resulting archives appear in the build directory (`.tar.gz` / `.zip`).
@@ -281,7 +278,7 @@ Build outputs appear in host directories (via volume mounts):
281
278
  - `build-cpp/bin/cpp_tests` - Native C++ test executable
282
279
  - `build-cpp/bin/measur_tools_suite` - Native CLI executable
283
280
  - `build-cpp/lib/libmeasur_tools_suite.a` - Static library
284
- - `build-wasm/bin/client.js` + `client.wasm` - WebAssembly module
281
+ - `bin/client.js` + `client.wasm` - WebAssembly module
285
282
 
286
283
  Run C++ tests on host:
287
284
  ```bash
@@ -305,17 +302,11 @@ Inside container, source tree is at `/home/MEASUR-Tools-Suite/`:
305
302
  ```bash
306
303
  # Run C++ tests
307
304
  ./build-cpp/bin/cpp_tests
305
+ # Windows: ./build-cpp/Debug/cpp_tests.exe (or Release)
308
306
 
309
307
  # Run WASM tests
310
308
  npm run tests
311
309
 
312
- # Incremental rebuild (native)
313
- cmake --build build-cpp -j 8
314
-
315
- # Incremental rebuild (WASM)
316
- source /home/emsdk/emsdk_env.sh
317
- emmake make -C build-wasm -j 8
318
-
319
310
  # Exit container
320
311
  exit
321
312
  ```
@@ -343,6 +334,7 @@ docker compose up -d
343
334
 
344
335
  The `docker-compose.yml` mounts host directories into the container:
345
336
  - `../MEASUR-Tools-Suite:/home/MEASUR-Tools-Suite` - Source code (editable from host)
337
+ - `./bin:/home/MEASUR-Tools-Suite/bin` - WASM build outputs
346
338
  - `./build-cpp:/home/MEASUR-Tools-Suite/build-cpp` - Native build outputs
347
339
  - `./build-wasm:/home/MEASUR-Tools-Suite/build-wasm` - WASM build outputs
348
340
 
@@ -356,8 +348,10 @@ The container executes the following sequence:
356
348
  3. Builds native targets: `cmake --build . -j 8`
357
349
  4. Configures WASM build: `cd build-wasm && emcmake cmake -DBUILD_WASM=ON ..`
358
350
  5. Builds WASM targets: `emmake make -j 8`
359
- 6. Installs Node dependencies: `npm install`
360
- 7. Sleeps indefinitely to keep container accessible
351
+ 6. Copies WASM artifacts to mounted `bin/` directory
352
+ 7. Installs Node dependencies: `npm install`
353
+ 8. Runs browser-based WASM tests using headless Chrome: `npm run tests`
354
+ 9. Sleeps indefinitely to keep container accessible
361
355
 
362
356
  ### 7.9 Docker Troubleshooting
363
357
 
@@ -404,22 +398,24 @@ emcc --version # verify Emscripten is active
404
398
 
405
399
  ```bash
406
400
  # Native build (library + CLI + tests)
407
- mkdir build-cpp && cd build-cpp && cmake .. && cmake --build .
401
+ cmake -S . -B build-cpp && cmake --build build-cpp
402
+ # Windows multi-config generators: cmake --build build-cpp --config Release
408
403
 
409
404
  # Run C++ tests
410
- ./bin/cpp_tests
405
+ ./build-cpp/bin/cpp_tests
411
406
 
412
407
  # WASM build
413
- mkdir build-wasm && cd build-wasm && emcmake cmake -DBUILD_WASM=ON .. && emmake make
408
+ emcmake cmake -S . -B build-wasm -DBUILD_WASM=ON && emmake make -C build-wasm
414
409
 
415
410
  # WASM browser tests
416
- npm install && npm run test:browser
411
+ npm install && npm run test:browser # install needed only on first run
417
412
 
418
413
  # Docs
419
414
  doxygen Doxyfile
420
415
 
421
416
  # Package
422
- cmake -DBUILD_PACKAGE=ON -DBUILD_TESTING=OFF .. && cmake --build . --target package
417
+ cmake -S . -B build-pkg -DBUILD_PACKAGE=ON -DBUILD_TESTING=OFF && cmake --build build-pkg --target package
418
+ # Windows multi-config generators: cmake --build build-pkg --config Release --target package
423
419
  ```
424
420
 
425
421
  ### Docker Builds
package/CONTRIBUTING.md CHANGED
@@ -2,18 +2,18 @@
2
2
 
3
3
  This guide provides clear standards and best practices for contributing to this project. It covers coding style, documentation, formatting, and workflow expectations to help maintain high code quality, ensure long-term maintainability, and foster smooth collaboration among all contributors.
4
4
 
5
- [<h2> Style Guide </h2>](/contributing/style-guide.md)
5
+ ## [Style Guide](/contributing/style-guide.md)
6
6
 
7
7
  Follow this guide to make sure your contributions align with the project's coding standards. This will help ensure that your code is readable, maintainable, and consistent with the rest of the codebase.
8
8
 
9
- [<h2> Formatting </h2>](/contributing/formatting.md)
9
+ ## [Formatting](/contributing/formatting.md)
10
10
 
11
11
  Follow the formatting standards using clang-format to ensure a consistent code style across all C++ files. This helps maintain readability and reduces merge conflicts.
12
12
 
13
- [<h2> Documentation </h2>](/contributing/documentation.md)
13
+ ## [Documentation](/contributing/documentation.md)
14
14
 
15
15
  Follow these guidelines to document your code effectively using Doxygen. Proper documentation is crucial for understanding the codebase and facilitating collaboration.
16
16
 
17
- [<h2> Conventional Commits </h2>](/contributing/conventional-commits.md)
17
+ ## [Conventional Commits](/contributing/conventional-commits.md)
18
18
 
19
19
  Use Conventional Commits to structure your commit messages. This helps maintain a clear project history and makes it easier to understand the purpose of each change.
package/README.md CHANGED
@@ -32,14 +32,16 @@ const measurTools = require('measur-tools-suite');
32
32
 
33
33
  ```bash
34
34
  # Native C++ build
35
- mkdir build-cpp && cd build-cpp
36
- cmake ..
37
- cmake --build .
35
+ cmake -S . -B build-cpp
36
+ cmake --build build-cpp
38
37
 
39
38
  # WebAssembly build (requires Emscripten)
40
- mkdir build-wasm && cd build-wasm
41
- emcmake cmake -DBUILD_WASM=ON ..
42
- emmake make
39
+ emcmake cmake -S . -B build-wasm -DBUILD_WASM=ON
40
+ emmake make -C build-wasm
41
+
42
+ # Packaging
43
+ cmake -S . -B build-pkg -DBUILD_PACKAGE=ON -DBUILD_TESTING=OFF
44
+ cmake --build build-pkg --target package
43
45
  ```
44
46
 
45
47
  See [BUILD.md](BUILD.md) for detailed build instructions, testing, and Docker workflows.
@@ -64,9 +66,9 @@ See [BUILD.md](BUILD.md) for detailed build instructions, testing, and Docker wo
64
66
 
65
67
  Contributions are welcome! Please refer to [CONTRIBUTING.md](CONTRIBUTING.md) for:
66
68
  - Code style guidelines ([contributing/style-guide.md](contributing/style-guide.md))
69
+ - Formatting standards ([contributing/formatting.md](contributing/formatting.md))
67
70
  - Documentation standards ([contributing/documentation.md](contributing/documentation.md))
68
71
  - Commit message conventions ([contributing/conventional-commits.md](contributing/conventional-commits.md))
69
- - Pull request process
70
72
 
71
73
  ## License
72
74
 
package/bin/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "measur-tools-suite",
3
- "version": "1.0.13-beta.134",
3
+ "version": "1.0.13-beta.136",
4
4
  "engines": {
5
5
  "node": "20.19.4",
6
6
  "npm": "10.8.2"
@@ -1,8 +1,8 @@
1
- # Conventional Commits <!-- omit in toc -->
1
+ # Conventional Commits
2
2
 
3
3
  This project follows the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) specification for commit messages to ensure clarity, consistency, and automation in version control. This helps in generating changelogs, automating releases, and improving collaboration among contributors.
4
4
 
5
- ## Table of Contents <!-- omit in toc -->
5
+ ## Table of Contents
6
6
 
7
7
  - [Commit Format](#commit-format)
8
8
  - [Commit Types](#commit-types)
@@ -1,8 +1,8 @@
1
- # Documentation <!-- omit in toc -->
1
+ # Documentation
2
2
 
3
3
  This project uses [Doxygen](https://www.doxygen.nl/) to generate documentation from annotated source code. Doxygen comments are used to describe the purpose, behavior, and usage of classes, functions, and other entities in the codebase. Follow these guidelines to ensure your code is well-documented and easy to understand. Always use `@` for Doxygen commands.
4
4
 
5
- ## Table of Contents <!-- omit in toc -->
5
+ ## Table of Contents
6
6
 
7
7
  - [Doxygen Commands](#doxygen-commands)
8
8
  - [Doxygen Aliases](#doxygen-aliases)
@@ -1,9 +1,8 @@
1
-
2
- # Formatting <!-- omit in toc -->
1
+ # Formatting
3
2
 
4
3
  This project uses [clang-format](https://clang.llvm.org/docs/ClangFormat.html) to ensure a consistent code style across all C++ files.
5
4
 
6
- ## Table of Contents <!-- omit in toc -->
5
+ ## Table of Contents
7
6
 
8
7
  - [Configuration](#configuration)
9
8
  - [How to Format Code](#how-to-format-code)
@@ -1,8 +1,8 @@
1
- # Style Guide <!-- omit in toc -->
1
+ # Style Guide
2
2
 
3
3
  Use this guide to ensure your contributions align with the project's coding standards. It is loosely based on the [Google C++ Style Guide](https://google.github.io/styleguide/cppguide.html) and the [C++ Core Guidelines](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines), with some modifications to suit this project's needs.
4
4
 
5
- ## Table of Contents <!-- omit in toc -->
5
+ ## Table of Contents
6
6
 
7
7
  - [Header Files](#header-files)
8
8
  - [Include Guards](#include-guards)
package/karma.conf.js CHANGED
@@ -10,8 +10,8 @@ module.exports = function (config) {
10
10
  frameworks: ['mocha'],
11
11
  files: [
12
12
  // All browser-based WASM Mocha tests
13
- { pattern: 'build-wasm/bin/client.js', included: false, served: true, watched: false },
14
- { pattern: 'build-wasm/bin/client.wasm', included: false, served: true, watched: false },
13
+ { pattern: 'bin/client.js', included: false, served: true, watched: false },
14
+ { pattern: 'bin/client.wasm', included: false, served: true, watched: false },
15
15
  'tests/wasm-mocha/**/*.test.js',
16
16
  // Add any additional files or patterns as needed
17
17
  ],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "measur-tools-suite",
3
- "version": "1.0.13-beta.134",
3
+ "version": "1.0.13-beta.136",
4
4
  "engines": {
5
5
  "node": "20.19.4",
6
6
  "npm": "10.8.2"