jyn514 / saltwater

A C compiler written in Rust, with a focus on good error messages.
BSD 3-Clause "New" or "Revised" License
294 stars 27 forks source link

Pre-compiled headers #369

Open jyn514 opened 4 years ago

jyn514 commented 4 years ago

Normally this would be pretty difficult because I'd have to write the serialization, but fortunately rust has serde! @Kixiron recommended the bincode backend which looks like exactly what I want.

jyn514 commented 4 years ago

Explanation of pre-compiled headers:

say you have a big header you include in almost every file, like windows.h or something because of C's broken compilation model, you have to lex, parse, and do semantic analysis on it every time pre-compiled headers is doing that once and storing it to a file somewhere so it's cached it doesn't have to be any standardized format