All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
v0.3.0 - 2025-09-04
- Introduced new code-repetition capability, that allows to produce multiple variations of user-supplied Rust code
using
for ... in ...syntax. - Introduced a type system, overloaded functions, new type casting functions - this would allow users to use much wider range of values, up to entirely arbitrary sequences of tokens. Previously values were limited only to idents.
- Introduced an alternative attribute-style invocation form
#[compose_items(...)]. - Introduced new
compose!macro as the preferred entry point (functionally identical to the previouscompose_idents!). - MSRV has been set to
1.80.0. - Added syntax reference to the documentation.
- Added migration guides for deprecated features.
- Made it possible to escape percent signs when formatting strings by using
%%syntax. - Added
normalize2(...), an evaluated variant ofnormalize(...)that acceptsident,str,int,path,type,expr, ortokensand returns a normalizedident(unlikenormalize(...), which consumes raw tokens).
- Error messages made to be more precise and informative.
- Made string formatting syntax more human-readable by enabling
% alias %-style placeholders (with whitespace). - Clarified the deprecation policy.
- Significantly refactored the project to improve modularity.
- Significantly expanded test coverage and reworked the test suite.
- Reworked introductory examples in the documentation.
- Harden the testing of support for both MSRV and stable Rust versions and of usage of the library as a dependency.
compose_idents!macro has been deprecated in favor of functionally identicalcompose!.
-
⚠️ BREAKING: Dropped the deprecated bracket-based alias-definition syntax support. -
⚠️ BREAKING: Removed interchangeable use of literal strings and ident arguments in functions that accept both.Type system and overloaded functions should take care of most use-cases and if necessary - use casting functions:
to_ident(),to_str(), etc.
v0.2.2 - 2025-06-16
- Fixed outdated alias definition instructions in the documentation.
- Fix grammar in the documentation.
v0.2.1 - 2025-06-13
- Fixed
Combinedparser-combinator helper type andcombine!macro. - Corrected the syntax section in the docs for
compose_idents!macro - made it up to date with the recent major syntax change that deprecated the bracket-based syntax in favor of expression-based one. - Added
publishtask to theTaskfile.ymlfor convenient publishing new versions of the crate.
v0.2.0 - 2025-06-11
- It is now possible to define aliases directly from expressions without surrounding brackets,
for example:
alias = exproralias = concat(arg1, arg2, ...). The old syntax will continue to work, but will emit a deprecation warning. - New
concat()function that concatenates multiple arguments together. - Deprecation warning mechanism has been added. Now if a user uses something that is deprecated, the macro
will try to attach
#[deprecated(...)]attribute to the generated code if it's possible.
- Refactored the reference - split a single big usage example into commented thematic Markdown sections.
- Added a minimal example into the beginning of the documentation.
- Stripped redundant top-level heading in docs.rs so that level-3 headings ("Functions", "Alias reuse", etc.) are now visible in the sidebar.
- Significantly reworked the internal code making it more extensible.
- Refactored deprecation mechanism - so that it is fully encapsulated within a single module and has a concise external API.
- Hardened parsing of alias values.
⚠️ BREAKING: case-conversion functions -snake_case(),camel_case(),pascal_case()have been re-implemented using the excellentheckcrate. It will bring more correctness but also might introduce some small changes in how these functions work.
- Deprecated
alias = [arg1, arg2, ...]syntax in favor of expression-based:alias = concat(arg1, arg2, ...)oralias = upper(arg)oralias = arg, etc.
- Fixed a bug with
snake_case()whenCamelCasewas converted toc_amel_caseinstead ofcamel_case. - Fixed a bug in
normalize()function that could append an extra trailing underscore to the result. - Fixed a bug where certain inputs (like
Result<T, E>) could be erroneously rejected bynormalize().
v0.1.1 - 2025-05-22
- Fixed argument parsing so that
compose_idents!doesn't fail with arguments such asnormalize(Foo::Bar), whereFoo::Baris an enum variant or anything else that could be ambiguously interpreted if not parsed until the end of the token (for exampleFoo::Barcould be interpreted as an identFooand::Baras a next completely different token).
v0.1.0 - 2025-05-19
- Explicitly restricted defining duplicate aliases.
- Made it possible to re-use previously defined aliases as parts of definitions of subsequent aliases.
- Introduce the
normalize()function, which transforms arbitrary token sequences into valid identifiers. Makes it possible to use things like&'static strin identifiers.
- Made it possible to pass arbitrary token sequences as arguments.
v0.0.7 - 2025-04-22
- Fixed a critical bug - incorrectly configured feature flags of "syn" dependency.
v0.0.6 - 2025-04-20
- New
pascal_case()function.
v0.0.5 - 2025-04-20
- Semicolon as the alias-definition terminator symbol has been replaced with comma. Semicolon support has been preserved for backwards-compatibility.
- Deprecated usage of a semicolon as a terminator-symbol for alias-definitions.
- Fixed edge case bugs in the
snake_caseandcamel_casefunctions.
v0.0.4 - 2025-03-21
- Documented functions and add more clarity to the docs in general.
- Introduced string formatting with
%alias%syntax useful for generating doc-attributes.
- Updated syn version to 2.
- Fixed handling of trailing semicolons in the macro.
v0.0.3 - 2025-02-11
- Added "functions" functionality that allows to apply functions over arguments.
- Made it possible to pass integers as arguments.
- Added
upper(),lower(),snake_case()andcamel_case()functions for case-manipulation. - Added
hash()function that hashes an input value deterministically within the scope of a single macro invocation.
- Docs/tests fixes.
v0.0.2 - 2025-02-05
- New tests.
- Support for specifying types as parts for the composed identifiers.
- Crates.io/Docs.rs badges to the README.md.
v0.0.1 - 2025-01-22
- README.md with the roadmap.
- .gitignore file.
- pre-commit config.
- Task config.
- Basic implementation of the compose-idents macro.
- GitHub CI setup.