Skip to content

Trustfall v0.4.0

Compare
Choose a tag to compare
@obi1kenobi obi1kenobi released this 24 Apr 14:04
· 334 commits to main since this release
a9d8d78

What's Changed

  • Breaking: Adapter trait methods now take &self instead of &mut self to avoid reentrancy bugs: #249
  • Breaking: Released the new optimizations API: Adapter methods now take a resolve_info argument that can be used to get information about the query for the purpose of applying optimizations. In cargo-semver-checks this new API led to a 2354x speedup.
  • Many smaller bug fixes thanks to 26,000+ lines of new tests and test code.

Migrating from Trustfall v0.3

Replace all BasicAdapter and Adapter method receivers with &self instead of &mut self.

If you need mutability, you need to do BOTH of these things:

  • advance the ContextIterator input iterator before doing any mutation, to avoid reentrancy bugs
  • use RefCell around your Adapter or BasicAdapter's mutable state, making sure to not hold its mutable borrow across operations on the input ContextIterator in order to avoid reentrancy bugs

All Merged PRs

New Contributors

Full Changelog: trustfall-v0.3.4...trustfall-v0.4.0