slint/tools/updater
Milian Wolff f6da161dbb
Reduce SmolStr <-> &str conversions and copies (#6688)
SmolStr has an Arc internally for large strings. This allows
cheap copies of large strings, but we lose that ability
when we convert the SmolStr to a &str and then reconstruct a
SmolStr from that slice.

I was hoping for some larger gains here, considering the impact
of this code change, but it only removes ~50k allocations,
while the impact on the runtime is not noticeable at all.

Still, I believe this is the right thing to do.

Before:
```
        allocations:            2338981

  Time (mean ± σ):     988.3 ms ±  17.9 ms    [User: 690.2 ms, System: 206.4 ms]
  Range (min … max):   956.4 ms … 1016.3 ms    10 runs
```

After:
```
        allocations:            2287723

  Time (mean ± σ):     989.8 ms ±  23.2 ms    [User: 699.2 ms, System: 197.6 ms]
  Range (min … max):   945.3 ms … 1021.4 ms    10 runs
```
2024-11-19 10:07:16 +01:00
..
experiments Reduce SmolStr <-> &str conversions and copies (#6688) 2024-11-19 10:07:16 +01:00
transforms Simplify commercial license (#3063) 2024-05-31 14:06:17 +02:00
Cargo.toml Use SmolStr in more places of the compiler infrastructure 2024-10-17 18:04:58 +02:00
main.rs Use SmolStr in more places of the compiler infrastructure 2024-10-17 18:04:58 +02:00
README.md Simplify commercial license (#3063) 2024-05-31 14:06:17 +02:00

Slint Updater

This program is a tool to upgrade .slint files from the Slint Project to the latest syntax.

The Slint Design Language evolves, with new features being added and old ones marked for deprecation. Use this tool to automatically upgrade your .slint files to the latest syntax.

Installation

The updater can be installed from crates.io:

cargo install slint-updater

Usage:

slint-updater -i /path/to/my/app/ui/**/*.slint