0.2.0 release

This commit is contained in:
2025-08-17 00:44:45 +01:00
parent 039bfcc201
commit e4780cf729
9 changed files with 902 additions and 455 deletions

50
src/constants.rs Normal file
View File

@@ -0,0 +1,50 @@
pub const BIN2HPP_HELP_TEXT: &'static str =
"Usage:\tbin2hpp -i INPUT_FILE [-o OUTPUT_FILE] [OPTIONS]
OPTIONS:
-i INPUT_FILE Path to input file to encode
(example: -i ../assets/shoot.ogg)
-o OUTPUT_FILE Optional output file path. Default behaviour is to create
the header file in the input file's directory.
(example: -o ./my_header.hpp)
--overwrite Overwrite the output file if it already exists
(default: don't overwrite)
LANGUAGE:
--cpp Set language features to C++ (runs in C mode by default)
OUTPUT OPTIONS:
--lf Use UNIX-style LF line endings (default)
--crlf Use Windows-style CRLF line endings
--mutable Whether the symbol should not be marked as const
--const Whether the symbol should be marked as const (default)
--constexpr Whether the symbol should be marked as constexpr (C++ mode)
--symname NAME Symbol name
--namespace NAME Namespace in which the symbol will exist
(uses namespace example {} in C++ mode and prepends
EXAMPLE_ to symbol names in C mode)
--guard NAME Preprocessor macro to use for the header guard (#ifndef ...)
(default: derive from output filename)
CONTAINER TYPES:
--carray C-style array (default)
--cstring C string, NUL-terminated
--stdarray C++ std::array
--stdstring C++ std::string
--stdstringview C++ std::string_view
BYTES TYPES FOR ARRAYS:
--char C's char type
--uchar C's unsigned char type (default)
--u8 C/C++'s (std::)uint8_t type
--i8 C/C++'s (std::)int8_t type
-h | --help Show this help text
-v | --version Print the program's build & version information";