Deprecated: Optional parameter $content declared before required parameter $post is implicitly treated as a required parameter in /vhost/r/o/t/rottedfrog.co.uk/www/wp-includes/functions.php on line 840

Deprecated: Creation of dynamic property wpdb::$categories is deprecated in /vhost/r/o/t/rottedfrog.co.uk/www/wp-includes/wp-db.php on line 668

Deprecated: Creation of dynamic property wpdb::$post2cat is deprecated in /vhost/r/o/t/rottedfrog.co.uk/www/wp-includes/wp-db.php on line 668

Deprecated: Creation of dynamic property wpdb::$link2cat is deprecated in /vhost/r/o/t/rottedfrog.co.uk/www/wp-includes/wp-db.php on line 668

Deprecated: Return type of WP_Theme::offsetExists($offset) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /vhost/r/o/t/rottedfrog.co.uk/www/wp-includes/class-wp-theme.php on line 553

Deprecated: Return type of WP_Theme::offsetGet($offset) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /vhost/r/o/t/rottedfrog.co.uk/www/wp-includes/class-wp-theme.php on line 594

Deprecated: Return type of WP_Theme::offsetSet($offset, $value) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /vhost/r/o/t/rottedfrog.co.uk/www/wp-includes/class-wp-theme.php on line 534

Deprecated: Return type of WP_Theme::offsetUnset($offset) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /vhost/r/o/t/rottedfrog.co.uk/www/wp-includes/class-wp-theme.php on line 543

Warning: Private methods cannot be final as they are never overridden by other classes in /vhost/r/o/t/rottedfrog.co.uk/www/wp-includes/class-wp-session-tokens.php on line 69

Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /vhost/r/o/t/rottedfrog.co.uk/www/wp-includes/comment-template.php on line 1720

Deprecated: Optional parameter $object_id declared before required parameter $taxonomy is implicitly treated as a required parameter in /vhost/r/o/t/rottedfrog.co.uk/www/wp-includes/nav-menu.php on line 1060

Deprecated: Return type of WP_REST_Request::offsetExists($offset) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /vhost/r/o/t/rottedfrog.co.uk/www/wp-includes/rest-api/class-wp-rest-request.php on line 934

Deprecated: Return type of WP_REST_Request::offsetGet($offset) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /vhost/r/o/t/rottedfrog.co.uk/www/wp-includes/rest-api/class-wp-rest-request.php on line 954

Deprecated: Return type of WP_REST_Request::offsetSet($offset, $value) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /vhost/r/o/t/rottedfrog.co.uk/www/wp-includes/rest-api/class-wp-rest-request.php on line 966

Deprecated: Return type of WP_REST_Request::offsetUnset($offset) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /vhost/r/o/t/rottedfrog.co.uk/www/wp-includes/rest-api/class-wp-rest-request.php on line 977

Deprecated: Return type of WP_Block_List::current() should either be compatible with Iterator::current(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /vhost/r/o/t/rottedfrog.co.uk/www/wp-includes/class-wp-block-list.php on line 151

Deprecated: Return type of WP_Block_List::next() should either be compatible with Iterator::next(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /vhost/r/o/t/rottedfrog.co.uk/www/wp-includes/class-wp-block-list.php on line 175

Deprecated: Return type of WP_Block_List::key() should either be compatible with Iterator::key(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /vhost/r/o/t/rottedfrog.co.uk/www/wp-includes/class-wp-block-list.php on line 164

Deprecated: Return type of WP_Block_List::valid() should either be compatible with Iterator::valid(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /vhost/r/o/t/rottedfrog.co.uk/www/wp-includes/class-wp-block-list.php on line 186

Deprecated: Return type of WP_Block_List::rewind() should either be compatible with Iterator::rewind(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /vhost/r/o/t/rottedfrog.co.uk/www/wp-includes/class-wp-block-list.php on line 138

Deprecated: Return type of WP_Block_List::offsetExists($index) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /vhost/r/o/t/rottedfrog.co.uk/www/wp-includes/class-wp-block-list.php on line 75

Deprecated: Return type of WP_Block_List::offsetGet($index) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /vhost/r/o/t/rottedfrog.co.uk/www/wp-includes/class-wp-block-list.php on line 89

Deprecated: Return type of WP_Block_List::offsetSet($index, $value) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /vhost/r/o/t/rottedfrog.co.uk/www/wp-includes/class-wp-block-list.php on line 110

Deprecated: Return type of WP_Block_List::offsetUnset($index) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /vhost/r/o/t/rottedfrog.co.uk/www/wp-includes/class-wp-block-list.php on line 127

Deprecated: Return type of WP_Block_List::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /vhost/r/o/t/rottedfrog.co.uk/www/wp-includes/class-wp-block-list.php on line 199

Deprecated: Optional parameter $block_name declared before required parameter $block_content is implicitly treated as a required parameter in /vhost/r/o/t/rottedfrog.co.uk/www/wp-includes/blocks.php on line 405

Deprecated: Creation of dynamic property WP_Term::$object_id is deprecated in /vhost/r/o/t/rottedfrog.co.uk/www/wp-includes/class-wp-term.php on line 198
What I’d like from Rust 2021 – Frog Blog

What I’d like from Rust 2021

I’ve been a user of Rust now for 2 years. It was something of a revelation – I was amazed at how well thought out the core of the language is – many classic C++ gotchas and kludges (null pointers, double free, use after free, slicing, diamond inheritance) have been completely designed out. In that time the language and compiler has evolved rapidly, with const functions, async await, and (hopefully by the end of the year) const generics. I’m lucky enough to have been working with Rust full time for most of the last 2 years, building an exchange for a fintech startup. As such performance is a key goal, and the reason we picked Rust over Java or Go. We are very happy with the choice, but there are always things we can improve on. So with that in mind. Here are my themes and priorities for what I’d like from Rust in 2021.

1. Expressive Performance

Rust is already both expressive and performant, but has some way to go to match C++ yet. C++ generics are still the gold standard to beat, with specialization, const generics and higher kinded (duck) types. From the perspective of building high performance ultra low latency software, being able to express things at compile time is critical for controlling performance. Therefore I’d really like to see const generics (https://github.com/rust-lang/rust/issues/44580), specialization (https://github.com/rust-lang/rust/issues/31844), and GATs (https://github.com/rust-lang/rust/issues/44265) to be pushed forward in 2021.

2. Rust and Rust Analyser, together forever <3

Rust analyser is awesome, in particular the pace of development is a sight to behold. But it’s are still not quite aligned with Rust. I’d love to see both the rust analyser team and rustc team push forward on the work (like chalk integration in rustc) that would help bring rust-analyser towards full parity with rustc.

I often still have issues with rust analyser not working on my large workspace, whereas when I open up a simple project, it’s flawless. I have yet to work out exactly what causes this, but it feels like it needs some work on large workspaces.

3. Scaling Cargo

I love Cargo – partly because it’s not (C)Make, but mostly because it makes building rust code so extremely simple. However it has some issues as codebases scale up and get more complex. Larger codebases can use multiple languages, sometimes more than one toolchain and pre or post build processing. Not every tool was designed to work seamlessly with rust and cargo, not should we expect it to.

  • Post build scripting: This would be incredibly helpful for projects that require creating packages, or generating manifests etc. There is an issue tracking this, which appears to be in RFC hell: https://github.com/rust-lang/cargo/issues/545.
  • Workspaces: Workspaces currently have weird quirks at the moment – for example a project’s dependencies can have different features activated depending on whether it is compiled as part of the whole workspace or with -p! (https://github.com/rust-lang/cargo/issues/4463)
  • Cargo config: Cargo config is done using hidden files, which seem to be relative to the working folder you run Cargo from, not relative to the project they apply to. This in particular cause some weird subtle bugs that took us a while to work around. It feels like a lot of this ought to be in the Cargo.toml manifest instead. (https://github.com/rust-lang/cargo/issues/8244)

4. Encouraging contributions on work for the roadmap

Rust has a stellar community full of bright developers, who are keen to contribute. I’d like to contribute, but I don’t know where to begin. Particularly hot topic issues, like GAT or specialization – the issues are huge, and I have no idea who is currently working on them or what state they are in, or even if I have the knowledge to help. If we are to get these big features out of RFC hell and into the stable compiler, it feels important that they are brought to the fore more publically than where they are now. How we do this I’m not sure, possibly a section of the main website which lists roadmap progress/calls for assistance. These things are hard to find currently, even when you know what you are looking for :).

5. Compiler speed is not a priority

I’m sure many people will disagree here. I think that this is currently less critical than the outstanding feature work. Whilst we can all do with more compilation speed, I’d rather have an amazing rust analyser experience and a super expressive type system. These things together would have a much bigger impact on my productivity than a faster compiler.


Deprecated: Creation of dynamic property WP_Term::$cat_ID is deprecated in /vhost/r/o/t/rottedfrog.co.uk/www/wp-includes/category.php on line 378

Deprecated: Creation of dynamic property WP_Term::$category_count is deprecated in /vhost/r/o/t/rottedfrog.co.uk/www/wp-includes/category.php on line 379

Deprecated: Creation of dynamic property WP_Term::$category_description is deprecated in /vhost/r/o/t/rottedfrog.co.uk/www/wp-includes/category.php on line 380

Deprecated: Creation of dynamic property WP_Term::$cat_name is deprecated in /vhost/r/o/t/rottedfrog.co.uk/www/wp-includes/category.php on line 381

Deprecated: Creation of dynamic property WP_Term::$category_nicename is deprecated in /vhost/r/o/t/rottedfrog.co.uk/www/wp-includes/category.php on line 382

Deprecated: Creation of dynamic property WP_Term::$category_parent is deprecated in /vhost/r/o/t/rottedfrog.co.uk/www/wp-includes/category.php on line 383

Deprecated: Creation of dynamic property WP_Query::$comments_by_type is deprecated in /vhost/r/o/t/rottedfrog.co.uk/www/wp-includes/comment-template.php on line 1509

Leave a Reply

Your email address will not be published. Required fields are marked *