Haha, seems like most I could share has already been shared! Biggest blocker why this didn't land about a year ago was because the new clap was still actively under development, and we needed that to hook in to generate the definitions.
-
-
Replying to @yoshuawuyts @DPC_22 and
The endgame I see here also is being to generate man pages without the need for build files / proc macros. Talked to
@oli_obk a while back (and last week again), and const writes seem like they could be the solution!https://github.com/rust-rfcs/const-eval/issues/25 …2 replies 1 retweet 4 likes -
Replying to @yoshuawuyts @DPC_22 and
pls no, surely there is a better way to make this work Q_Q
2 replies 0 retweets 1 like -
Replying to @eddyb_r
The best way to describe the general case here is: "we need to be able to write to disk during compile time". Compile-time reads are already possible (include_bytes). Writes too in macros. It's hard to think of a better way of doing this, other than dismissing the use case.
2 replies 0 retweets 1 like -
Replying to @yoshuawuyts
I think oli brought up the "turn a static/const into an artifact" alternative already elsewhere pretty sure wasm-bindgen already does tricks with smuggling data through special sections in short, there isn't anything wrong with *declaratively* supplying extra artifacts
2 replies 0 retweets 3 likes -
Replying to @eddyb_r @yoshuawuyts
however, const-eval having *any* global side-effects, *even* output-only ones, is a Pandora's box I *do not* want to open the difference between it and macros is that macro expansion *fully completes* before the typesystem *exists*, whereas const-eval is *entirely within* it
1 reply 0 retweets 2 likes -
Replying to @eddyb_r @yoshuawuyts
you don't want a file to be written whenever you look at a type in a certain funny way, and it can only get worse from there soundness is paramount (because you can transmute in safe code relatively easily once you can get the same constant to evaluate to different values)
1 reply 0 retweets 1 like -
Replying to @eddyb_r @yoshuawuyts
imagine fs::write at compile-time actually reporting an error. and there are a lot of details like that all over the bloody place it's *just not worth it* safer to have everyone expose a --help-as-manpage or w/e with no language support needed, for example
2 replies 0 retweets 1 like -
Replying to @eddyb_r
Heh, a few other things that would be useful to generate during compile: css files, HTML templates, worker files, shell completions. I feel that a general solution for generating these at compile time would probably be the way to go.
2 replies 0 retweets 1 like -
Replying to @yoshuawuyts @eddyb_r
Have you heard of our Lord and savior http://build.rs
2 replies 0 retweets 2 likes
Hah yes ofc, but problems with it include: needing to declare dependencies twice, c-style dependency management makes everything weird, and double compilation of code makes for bad build times. We should have something better for these uses in the long term (:
-
-
Replying to @yoshuawuyts @mgattozzi
It could really help if we had http://post-build.rs instead. This was brought up several times for various use cases (running tools on produced artifact), but could help here as well.
0 replies 0 retweets 1 likeThanks. Twitter will use this to make your timeline better. UndoUndo
-
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.