ekzhang / crepe

Datalog compiler embedded in Rust as a procedural macro
Apache License 2.0
453 stars 16 forks source link

State of the crate. #3

Closed meh closed 2 years ago

meh commented 4 years ago

What's the current state of the crate? How insane would I be to use this in production?

Looks really cool so far!

ekzhang commented 4 years ago

Thanks for your interest @meh! Right now the crate is functional and should work for standard Datalog programs (plus stratified negation), as well as Horn clauses that have Rust code in them. The docs are the most complete specification and include examples.

However, it hasn't been used in larger projects yet. Currently I would like to try writing some static analyses in Crepe, maybe replicating Polonius. Would love to get feedback on other potential use cases.

Also, just wanted to mention - your blog post on comfy web services is what got me interested in Rust a few months ago! 😄

meh commented 4 years ago

Right now what I have in mind is implementing a very flexible permission system, but I'm not sure if what I have in mind is a good idea.

My idea was to use serde to save the facts in the database and/or JWT, and on those facts verifying if they can access some resource and such.

I'm also thinking about encoding legal contracts in this manner, but that's a long time away.

ekzhang commented 4 years ago

That sounds really cool. I would be interested to know how your permission system goes, especially if you decide to use this Datalog implementation. Please let me know if there's any tricky parts along the way re: Crepe.

meh commented 3 years ago

I'll keep you posted!

rsr-at-mindtwin commented 3 years ago

Is there a license planned?

ekzhang commented 3 years ago

Dual-licensed under Apache 2.0 / MIT, as described in Cargo.toml. I'll add the license files to the repository.

ekzhang commented 2 years ago

Looks like Crepe is indeed being used in production anyway, so I'm going to close this issue now. :)