TODO: Date
-
Breaking:
- Increased minimum supported Rust version from 1.45.0 to 1.58.0
since
asteracea::error
usesstd::panic::panic_any(…)
, and for format string interpolation, and to show better event binding validation errors using const panics. - Removed "rhizome" features (always enabled now)
- Removed "styles" and "topiary" features. CSS scoping will be enabled through more general means.
- Reworked generated component interface
- Upgraded
lignin
andlignin-schema
dependencies to 0.0.3 each - Removed all type-level (static) storage declarations. This reduces complexity a lot. Use plain Rust
static
items and, where needed,new with { …; }
blocks and/orwith { …; } <…>
expressions instead. - Reorganised reexported dependencies and made some of them private
- Upgraded
lignin
dependency from 0.0.3 to 0.0.5to support fallible rendering.
- Generated
.render(…)
methods are now fallible, returningResult<_, Escalation>
. - The
"backtrace"
feature was replaced by"tracing"
, which enablestracing
compatibility. - Changed
bump_format!
shorthand syntax.:
!"format string"
,!"format_string"(args)
and!(args)
are all valid now, though in the last case the format string is implicitly"{}"
.
- Increased minimum supported Rust version from 1.45.0 to 1.58.0
-
Features:
-
You can now prefix constructor arguments with an explicit visibility (
priv
,pub
,pub(restriction)
) to capture them as component instance fields. -
bump
resolution is now more reliable in cases where the macro input is constructed in multiple macro contexts. -
Allow restating element names when closing them (e.g.
/div>
) -
Added support for unvalidated (custom) HTML element names:
<"custom-element">
-
HTML comments with
<!-- "comment text" -->
-
Custom (Asteracea component) child elements:
<*Name *new_arg = {} .render_arg = {} >
-
Child component instancing:
<*Name priv name> // Alternatively: `pub`, `pub(…)` <*{self.name_pinned()}> // Without `*new_arg`s!
-
Optional arguments:
pattern?: Type
-
Default parameters:
pattern: Type = default
-
Conditional attributes:
."attribute-name"? = {Option<&'bump str>}
-
Conditional parameters (like conditional attributes)
-
Boolean attributes:
."attribute-name"? = {bool}
-
new with { …; }
blocks to insert statements into the constructor -
with { …; } <…>
expressions to insert statements into the.render
method -
Conditional content via
if {…} <…>
,if …… else <…>
andmatch <…> [ … ]
-
Box expressions:
box ⟦priv …⟦: ⟦struct⟧ … ⟦where …;⟧⟧⟧ <…>
-
-
Revisions:
- Improved
Counter
example in the README.
- Improved
2020-10-08
- Features:
-
Added shorthand formatting syntax:
Use
!{value}
to format plainly usingDisplay
.
Use e.g.!"{} {}"{value1, value2}
to specify a custom format string.
-
2020-10-05
Initial unstable release