-
|
Describe the bug To Reproduce Expected behavior Additional context |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
I looked into this and it looks like the long compile time is dominated by the pest grammar parsing. so instead of using the derive macro you can just generate the parser code once into something like https://github.com/pest-parser/pest/blob/master/meta/src/grammar.rs That way changes in your code won't trigger (long) re-parsing of the grammar and should have normal compile times. |
Beta Was this translation helpful? Give feedback.
I looked into this and it looks like the long compile time is dominated by the pest grammar parsing.
Unfortunately, this may not be something easily fixable in the short time. As a workaround, I suggest building/generating the grammar separately into a Rust file once (or just whenever the grammar changes) similarly to the bootstrap: https://github.com/pest-parser/pest/blob/master/bootstrap/src/main.rs
so instead of using the derive macro
you can just generate the parser code once into something like https://github.com/pest-parser/pest/blob/master/meta/src/grammar.rs
That way changes in your code won't trigger (long) re-parsing of the …