-
Notifications
You must be signed in to change notification settings - Fork 2
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
Add basic struct generation #1
Conversation
@@ -24,10 +25,14 @@ fn main() { | |||
|
|||
// Welcome Message | |||
println!( | |||
"{} \n(c) The Nezara Project. (github.com/The-Nezara/Project)\n |
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.
I knew I had a typo in there somewhere!
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.
So I have looked over it and found that it panics on my machine.
Here's the shortened backtrace, maybe you can figure this one out:
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 2, kind: NotFound, message: "No such file or directory" }', src/bindgen.rs:94:70
stack backtrace:
0: rust_begin_unwind
at /rustc/5680fa18feaa87f3ff04063800aec256c3d4b4be/library/std/src/panicking.rs:593:5
1: core::panicking::panic_fmt
at /rustc/5680fa18feaa87f3ff04063800aec256c3d4b4be/library/core/src/panicking.rs:67:14
2: core::result::unwrap_failed
at /rustc/5680fa18feaa87f3ff04063800aec256c3d4b4be/library/core/src/result.rs:1651:5
3: core::result::Result<T,E>::unwrap
at /rustc/5680fa18feaa87f3ff04063800aec256c3d4b4be/library/core/src/result.rs:1076:23
4: thanix::bindgen::gen
at ./src/bindgen.rs:94:26
5: thanix::main
at ./src/main.rs:35:23
6: core::ops::function::FnOnce::call_once
at /rustc/5680fa18feaa87f3ff04063800aec256c3d4b4be/library/core/src/ops/function.rs:250:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
Also I would like you to format the code using cargo fmt
if not already done so. The workflow shows errors so if you could check that I would greatly appreciate this.
Apart from that, great work and thanks for the help!
I think you just need to create the "output/" directory, that's an easy fix though. |
You were right that did the trick. Stupid that I didn't think of that. 🤦🏼 Clippy will complain about dead code but as these are classified as warnings they can be ignored for now. But I did see real errors in the workflow output so maybe check tomorrow. |
Should work now, seems like |
Great work on fixing that this quickly. |
Sure, I'll get to it. |
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.
LGTM. We're gonna rework the splitting of these structs into different modules later.
faa430d
to
af8cde0
Compare
What does this PR change?
This PR adds a basic Rust struct generation by parsing a YAML schema using Serde and then reformatting the output.
Tick the applicable box: