|
|
Subscribe / Log in / New account

Distributed compiling?

Distributed compiling?

Posted Aug 14, 2024 23:58 UTC (Wed) by tialaramex (subscriber, #21167)
In reply to: Distributed compiling? by taladar
Parent article: Rust Project goals for 2024

Although the entire text of some "header file" isn't copy-pasted, it is usual in Rust to write a lot of #[derive(...)] lists for your user defined types.

#[derive(Hash)] is just a few keystrokes, but it will emit a new implementation of this trait, with a hash function, in which all the elements of your user defined type are separately hashed as appropriate.

For the standard library derive macros (and to a lesser extent popular 3rd party crates) this will definitely work, which is a change from #include files that may cause complete chaos in the resulting code as they perform arbitrary text re-writes of your code and each other, but in respect of more work for the compiler than you can see by eye that's still there.


to post comments


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds