differential-datalog
differential-datalog copied to clipboard
RFE: an interpreted language as an intermediate language to speed up testing
Rust IM language is quite slow on recompiles, which is frustrating. Maybe it's possible to build template in an interpreted language (say, Python)?
This would be fine for newcomers/tutorial/CLI cases. The Rust IM language can be used for release/embedded builds though.
I understand this is quite a lot of duplication, but maybe it can be reduced with FFI to Rust non-generated objects.
Yep, this is something we've been talking about for a while. You're right, much of the template code, in particular everything inside the differential_datalog
crate is static and can be reused in the interpreted version. Most of the Haskell compiler logic can likewise be reused.
We just need to find the time to build (and maintain) this, which might take a while :)
PS. As mentioned in my other message, compilation times are much more tolerable now that we are taking advantage of incremental compilation, which is another reason this is not at the top of our todo list.
as a newbie to Rust, could you elaborate on what kind of commands you normally run for incremental compilation? Thanks.
You don't need to do anything to take advantage of incremental compilation. As you change your DDlog program and run ddlog
on it, the DDlog compiler will modify affected Rust source files. As you then run cargo
on the generated Rust project, it will reuse results of previous compilations. In my experience, while the first compilation usually takes a few minutes, small changes to DDlog tend to take less than a minute to recompile (often, much less for smaller programs).
thanks, I'll do so.