Repository navigation
Develop - #2
Merged
Merged
Develop#2
Conversation
- Add CMake policy settings to suppress warnings - Add GENERATE_MAP_INFO option for generating map information - Bump project version from 0.1.4 to 0.2.0 - Update command source file collection from .cppm to .cpp - Add static CRT compilation option configuration - Configure link options to generate map files docs: add contribution guidelines and test framework documentation - Create CONTRIBUTING.md containing development workflow and code style guidelines - Add test framework documentation (English and Chinese versions) - Update documentation links in README to point to new documents chore: update .gitignore and clean up Linux help documentation - Add /testing directory to ignore list - Remove help documentation files for multiple Linux commands - Update supported parameter list for ls command (-n, --color)
…g handling across all commands - Add complete safePrint overload set in utils:console module: * safePrint(const wchar_t*) - zero-cost wide string output * safePrint(char) - single character output * safePrint(const char*) - C string output * safePrint(std::string_view) - zero-copy string view output * safePrint(int/unsigned/long/long long) - integer formatting output * safePrint(bool) - boolean output * safePrint(const void*) - pointer output * Corresponding overloads for safeErrorPrint * Corresponding overloads for safePrintLn/safeErrorPrintLn - Completely eliminate high-cost operations in all commands: * Remove all std::wostringstream instantiations (save 8.6KB each) * Remove all std::wstring(1, c) constructions (save 1.2KB each) * Remove all L"^" + std::wstring concatenations (save 2.4KB each) * Remove all std::string(a + b + c) chained concatenations * Replace with snprintf + std::string_view stack formatting - Optimize specific command implementations: * cat.cppm: completely rewrite character processing logic, STL overhead 38KB → 20KB * ls.cppm: permission string wstring → string, size formatting wostringstream → snprintf * cp.cppm/mv.cppm: remove operator+ path concatenation, use operator+= * echo.cppm: simplify output logic, remove temporary wstring * rm.cppm/wc.cppm/mkdir.cppm: unify to use safePrint overload set - Infrastructure improvements: * Add src/pch/string_instances.h/cpp for explicit std::string/std::wstring instantiations * Add string_instances.cpp to CMakeLists.txt for both winuxcmd and command macro * Include string_instances.h in pch.h for shared instantiation declarations across all modules - Documentation: * Add "High-Performance C++23 Coding Guidelines" section in CONTRIBUTING.md * Add Chinese version CONTRIBUTING_ZH.MD with detailed string handling best practices * Provide string type selection guide with recommended/cautious/prohibited categories * Add code templates for file size formatting, time formatting, path building * Add cost comparison table for different string operations * Update website links in README-zh.md and README.md to product links Performance improvements: * Total executable size: 477KB → 428KB (↓49KB) * ls.cpp.obj: 53.75KB → 38.95KB (↓14.8KB) * cat.cpp.obj: 35.11KB → 28.44KB (↓6.67KB) * echo.cpp.obj: 19.80KB → 14.03KB (↓5.77KB) * cp.cpp.obj: 25.04KB → 22.76KB (↓2.28KB) * rm.cpp.obj: 16.43KB → 14.41KB (↓2.02KB) * stl_string overhead: 146KB → 129KB (↓17KB) * string_instances.cpp.obj: 15.07KB → 12.53KB (↓2.54KB)
caomengxuan666
added a commit
that referenced
this pull request
Mar 24, 2026
This was referenced Nov 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add complete safePrint overload set in utils:console module:
Completely eliminate high-cost operations in all commands:
Optimize specific command implementations:
Infrastructure improvements:
Documentation:
Performance improvements: