Open aferr opened 2 years ago
cc: @tiziano88
One way to improve this could just be to package the rule needed to build souffle and its dependencies into a .bzl
file and include this .bzl
in a released archive from the raksha repository. This should allow us to import souffle and the related dependencies with just something like:
http_archive(
name = "raksha_deps",
...
)
load("@raksha_deps//raksha_deps:raksha_deps.bzl, "raksha_register_toolchains")
Flex provides a release like this one that can be used as an example. See flex.bzl
and flex_register_toolchains
in https://github.com/jmillikin/rules_m4/releases/download/v0.2/rules_m4-v0.2.tar.xz
Currently using the rust implementation of authorization logic requires additional dependencies to be installed as shown here. For example, a souffle binary is built using a separate bazel rule, and the github workflow is modified to install mcpp.
It would be easier for other projects to use authorizaiton logic if it is possible to use a single bazel rule.
One way to do this could be to write a single bazel rule that collects all of the dependencies and just allows consumers to use this one rule.
Another way (or just a way to make the above option simpler) could be to implement the authorization logic compiler so that it uses the (C++) Souffle library rather than invoking it as a separate binary. This is probably best to do only for the C++ implementation of authorization logic.