Writing macro_rules macros by hand really does give me the "programming is writing weird gibberish"-feel.
-
Show this thread
-
Replying to @yoshuawuyts
Right? I think that's why I avoided it for so long
1 reply 0 retweets 2 likes -
Replying to @jntrnr
I'm super stoked for all the proc macro goodness folks have been talking about. Heard folks are now experimenting with pre-compiling proc macros to wasm so we can get rid of the syn + quote compilation from http://crates.io , which would make all of this so much better!! :D
2 replies 2 retweets 9 likes -
Replying to @yoshuawuyts
I hadn't heard about that, but it sounds awesome2 replies 0 retweets 3 likes -
Replying to @jntrnr
Haha yeah
@davidtolnay told me agput it during RustConf, and so excited about it also!!!1 reply 0 retweets 3 likes -
I'm extremely confused at how wasm affects proc macros
1 reply 0 retweets 4 likes -
We'd like to have http://crates.io distribute proc macros as precompiled wasm binaries that are executed by a wasm runtime in the compiler. Then adding a dependency on a proc macro no longer adds anything to compile time.
4 replies 6 retweets 26 likes -
Interesting. You still have to compile the wasm, so it's not "nothing" ;) Why wasm over MIR or a cranelift based rustc?
1 reply 0 retweets 3 likes -
Replying to @sgrif @davidtolnay and
Wild guess: wasm is stable, MIR is *very* unstable
1 reply 0 retweets 1 like
That's my guess too, but this is executed in the compiler so there's some flexibility -- and there's been talk of MIR only crates for a while now so the idea of making it forwards compatible seems like it's in the realm of possibility anyway
-
-
Replying to @sgrif @steveklabnik and
My impression is MIR codegen to machine code takes much longer than wasm to machine code, or alternatively interpreted MIR has a 10x or worse performance overhead than wasm. Determinism and isolation are additional advantages over MIR:https://internals.rust-lang.org/t/pre-rfc-procmacros-implemented-in-wasm/10860 …
2 replies 0 retweets 4 likes -
Replying to @davidtolnay @steveklabnik and
Makes sense. Avoiding LLVM here is a huge win I suspect. Thanks for the context.
0 replies 0 retweets 3 likes
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.