New Release of Sway `v0.68`

We’re happy to share the release of new Sway v0.68. It brings significant performance boosts and important safety enhancements.

What’s New?

  1. Huge Performance Boost in LSP: We’ve greatly improved the Language Server Protocol (LSP) performance, resulting in up to 140x faster keystroke reaction times. These are the LSP benchmarks:
  • traverse: 230.9 ms/116.6 ms
  • code_action: 28.3 ms/8.4 ms
  1. Improved Trait Safety: Sway has adopted stricter rules for trait implementations, similar to Rust’s orphan rules.
    What does this mean for you?
    The compiler will no longer allow the following and will throw an error in the following cases:
  • implementing traits for types you don’t own (such as types from the standard library), though you can still implement From for types you don’t own as in Rust
  • overlapping implementations for a single type

Reference PRs

  1. #7093
  2. #7080
  3. #6844
1 Like