-
Notifications
You must be signed in to change notification settings - Fork 182
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: bindgen crate #1425
feat: bindgen crate #1425
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #1425 +/- ##
==========================================
- Coverage 67.62% 67.08% -0.55%
==========================================
Files 218 223 +5
Lines 21060 21235 +175
==========================================
+ Hits 14242 14245 +3
- Misses 6818 6990 +172 ☔ View full report in Codecov by Sentry. |
For testing I'm thinking about using a build.rs to use |
|
||
// Spawn and move project is not built at the time this lib is being tested. | ||
// Need plain artifacts to simplify or use `sozo` from env (available as we're in the devcontainer). | ||
// #[cfg(test)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you include dojo-dev-utils with the build-examples
feature it should build these for you
Line 48 in 87599f9
dojo-test-utils = { path = "../dojo-test-utils", features = [ "build-examples" ] } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for pointing this out again. For any reason I was thinking that I had a cyclic dependency like I had last time working with this, but dojo-test-utils
is based on dojo-lang
and not sozo
...
Thank you again sensei 🙏.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The stack overflow error on windows seems to be related to this new dependency I added. I'll investigate the possible cause because we normally don't run the build again if the target is not empty.
Will also check what scarb did to solve that, in order to see if their modifications/solutions can apply for us too.
I commented out the tests. I don't like to do that but is to keep track of the working tests at the same location.
The idea is to move forward, as nasr already have great stuff working on that, to make it public and keep improving this bindgen.
This PR adds the
dojo-bindgen
crate where plugins will be managed for auto-generated code on the top of cainome.Currently, we're proposed built-in plugins, that are written in rust, and may be updated by the community and maintainers.
In a second phase, the
PluginManager
will also expose someplugins
to be called usingstdin
in the same fashion as protobuf to allow endless extension by users without having to push their code on dojo repo.