rune icon indicating copy to clipboard operation
rune copied to clipboard

0.14.0 migration guide?

Open VorpalBlade opened this issue 6 months ago • 7 comments
trafficstars

It would be nice to have a migration guide / release notes highlights from 0.13 to 0.14. Perhaps as a post on the website blog?

So far I have found that:

  1. Matching on Value no longer works, you now need to use as_integer, borrow_string_ref etc in a series of if-statements.
  2. Constructing Value::Integer etc directly no longer works, use From/Into.
  3. I don't know how to replace matching on rune::Value::Result (which was a Shared<Result<Value, Value>>). Should I use Value::borrow_ref::<Result<Value, Value>>? Where does the outer shared go?
  4. Debug and Display protocols have changed (STRING_DEBUG -> DEBUG_FMT and STRING_DISPLAY -> DISPLAY_FMT). I don't yet know if the expected signature has also changed.
  5. Shared smart pointer is gone. No replacement?

I don't know how to replace Shared in something like:

enum Selector {
    /// Match all lines
    #[rune(constructor)]
    All,
    // ...
    #[rune(constructor)]
    Function(#[rune(get)] Shared<rune::runtime::Function>),
}
  1. I don't know how to replace Value::into_any.

VorpalBlade avatar Apr 21 '25 15:04 VorpalBlade