Skip to content

Version 0.5.0

Latest
Compare
Choose a tag to compare
@laurmaedje laurmaedje released this 31 Jul 08:30
  • Implemented new constraint checking mechanism that speeds up validation of cache hits and avoids quadratic running time in pathological cases
  • (Breaking change) The new design requires memoized functions to adhere to a new definition of determinism that we call reorderably deterministic. It is explained in the docs of the #[memoize] attribute. In practice, it's typically fulfilled by deterministic functions. If it's not fulfilled, comemo will panic in debug mode. Meanwhile, in release mode, memoized functions will still yield correct results, but caching may prove ineffective.
  • (Breaking change) Dropped support for mutable methods with return values and mixes of mutable and immutable methods in tracked blocks. Supporting this in the new constraint checker was deemed not worth it at this time.
  • (Breaking change) The Validate trait was removed. The new design for manual constraint handling and validation is centered around the newly public Constraint type. Note that manual constraint handling is not relevant for average usage, but it's useful in rare case, for example in Typst's introspection system to detect layout convergence.
  • Added enabled parameter to #[memoize] attribute for selectively disabling memoization based on the concrete input
  • Added enabled-by-default macros feature that guards the attribute macros
  • MSRV bumped to Rust 1.88, crates upgraded to 2024 edition
  • Improved performance by using a faster hashing function in internal data structures
  • Dropped dependency on once_cell