Open W95Psp opened 1 year ago
Regarding the point about rustc errors, we're having similar considerations over on charon&aeneas. Are you sure it would be so hard to generate errors ourselves? Getting the right file/line info out of a span is easy, and many crates provide rustc-like error output. We can also do rust-specific things like merging spans and resolving spans across macro expansions before we turn them into our own dumb spans. I don't see any major obstacle. What obstacles do you see that I don't?
Currently:
cargo-hax
callscargo build
with our driver, then for each selected package: a. cargo runs our driver b. the driver runs Rustc with special hooks c. we export a THIR AST d. pipe it as JSON to the engine e. write F/Coq/ filesIt would be better to buffer all JSON at 1.c., and call the engine once.
Pros:
-i '-** +PATH_TO_f
, butf
has dependencies that spawn across the virtual workspace)-i
selects nothing (for now, such warnings would be clumsy because of the engine being ran only on a package. For instance, in a workspace with say packages A and B, a-i
clause might be selecting something in A but not in B, thus we cannot really generate a warning)Cons: