This PR switches us over to a fork of `ctor` that contains the fixes
from https://github.com/mmastrac/rust-ctor/pull/295, backported to our
current version of `ctor` (v0.1.20).
Once 1) the `ctor` maintainer publishes a new version with that change
and 2) we're ready to upgrade to the latest version of `ctor` we can
switch back to the mainline version.
Release Notes:
- N/A
This adds a `UniformList` element and partially implements `Picker` as a
component, using `UniformList`. Because editor2 isn't fully implemented
yet, the picker doesn't have filtering logic yet. We want to merge this
for now though, to make the UniformList element available for other
crates.
Release Notes:
- N/A
Project2's LLVM IR size is ~33-44% bigger than project1 due to the fact
that in gpui2 we call async_task::spawn(_local) with impl Future instead
of dyn Future, which leads to quite a few more instantiations of
RawTask.
LLVM-IR size for project2:
| build_type | main | this branch | project1 |
| debug | 2617795 | 2022814 | 1817866 |
| release | 4439033 | 3715086 | 3314489 |
Note that this PR is in line with what was done in GPUI1 (we've also
boxed futures there).
Release Notes:
- N/A
Project2's LLVM IR size is ~20-25% bigger than project1 due to the fact that in gpui2 we call async_task::spawn(_local) with impl Future instead of dyn Future, which leads to quite a few more instantiations of RawTask.
LLVM-IR size for project2:
| build_type | main | this branch | project1 |
| debug | 2617795 | 2022814 | 1817866 |
| release | 4439033 | 3715086 | 3314489 |
This updates our approach to action registration to make it
static/global.
There are 3 different approaches to creating an action, depending on the
complexity of your action's implementation. All of them involve defining
a data type with the correct trait implementations and registering it,
each a bit more powerful / verbose.
* Define a simple list of unit structs that implement `Action` -
`actions!(Foo, Bar, Baz)`
* Make a more complex data type into an action with `#[action]`. This
derives all the necessary traits and registers the action.
```rs
#[action]
struct MoveLeft {
word: true
}
```
* Implement all traits yourself and just register the action with
`#[register_action]`.
Release Notes:
N/A