-
Notifications
You must be signed in to change notification settings - Fork 506
support non-result return values in jsg rust #5743
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
Conversation
fa13c8a to
33688a1
Compare
|
The generated output of |
f1c9bcb to
95722ed
Compare
Merging this PR will not alter performanceSummary
Comparing Footnotes
|
mikea
left a comment
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 think error handling design needs a bit more love.
guybedford
left a comment
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.
It would really help to have a clear explanation of the distinction between what types are covered by Type and what types are covered by Wrappable, as it's not clear which set is larger / or if they are disjoint apart from their intersection?
guybedford
left a comment
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.
Also, in the name of ensuring edge cases, it helps to have tests for cases like Result<Option>, Result<Result, ...> as well when dealing with Result interactions.
95722ed to
153ece0
Compare
f5f19ac to
a945b9a
Compare
|
Rebased and force pushed. |
0744afb to
123ae7e
Compare
|
Rebased and force pushed. |
This PR introduces a cleaner type conversion system for the JSG/Rust bindings by implementing ToJS and FromJS traits. The main improvement is that JSG methods can now return values directly without requiring Result<T, E> wrappers when no error handling is needed.
Additionally, this PR improves the test harness to return and unwrap correct values which simplifies the tests by a significant margin.