Open Kixiron opened 3 years ago
A straightforward generalization of the current design would be to allow a directory containing a Rust crate per DDlog module.
That'd definitely be nice, but it still suffers from the problems of tooling not working properly
If the Rust directory is a self-contained crate, there's no reason Rust tooling wouldn't work on it. But if it depends on Rust code generated from DDlog, one would have to run the ddlog compiler before running Rust tools.
Oh, I thought you were meaning to just extend it to a module and not a crate.
One would have to run the ddlog compiler before running Rust tools
Yah, unfortunately I don't really think there's a perfect solution
I've got no idea how things would work, but as-is writing rust alongside ddlog kinda sucks, especially if you write relation transformers. In an ideal scenario we'd check all these boxes:
rustfmt
,clippy
andcargo check
just can't really function on the standalone files which makes it hard to write as well as keep to a high code qualityAgain I don't really know how we'd go about this, maybe we'd require external code to be a library crate supplied by the user that we connect to with ddlog or something which could be really advantageous for a number of reasons, such as being able to link multiple rust crates into a single ddlog module with this hypothetical syntax