DSL parser and compiler written in Rust #51
iammathew
started this conversation in
Show and tell
Replies: 1 comment 4 replies
-
Thanks for sharing this @iAmMatthew! Linked to it in this PR, please take a look and let me know if I got everything right In terms of community collaboration, I would love to have a base set of tests for all the projects - we can export them from the syntax-transformer repo for all of you to contribute to and consume. I wonder what would be a good format for all of you. A single json file? A folder with multiple json files, each containing the JSON and the DSL syntax? Multiple folder with one file for the JSON, one for the DSL? We would need to export:
So maybe:
(cc @adriantam) |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey OpenFGA community,
just wanted to share this small project of mine here. Since the current DSL parser is a nodejs package and therefore not as easy-to-use depending on your use case, I built a rust version of it, the code is still very early stage (also my Rust experience is not very strong).
https://github.com/iammathew/openfga-rs
Right now, unfortunately, it does not have any correctness checking of the parsed model, which I plan to add next, other planned changes are to make a WebAssembly module available so it can run in the browser or wherever you need it!
If that is done, I'm thinking about actually using the same parser to create a simple LSP for better code navigation inside VSCode.
Also I feel like currently it may not include all features of the DSL, but can parse all of the published examples.
Feel free to let me know about your thoughts and opinions!
Beta Was this translation helpful? Give feedback.
All reactions