GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — libprocessing ffi error handling by tychedelia · Pull Request #1293 · processing/processing4 Conversation
Member
Sets up basic bevy Our strategy here is the following: Java should do any validation necessary before calling into the FFI layer. Errors are assumed to be unrecoverable and evidence of us doing something wrong. So we don't return error codes or anything but just check the error status as a string so we can at least throw a helpful exception for bug reports.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
catilac
reviewed
Uh oh!
There was an error while loading. Please reload this page.
catilac
reviewed
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. for wayland windowing we need to add
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. if it's helpful, i can do it separately so i can actually test
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we'll def need more fleshing out here, i think there's a bunch of other stuff we'll want too. we're just generally going to be doing the "annoying" bevy integration version where we fine grain select what we want. this is to keep the final dylib small for packaging. see also the recently merged bevyengine/bevy#21472 which could be helpful for us.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. that looks cool. maybe useful for per-target customization
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
catilac
approved these changes
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Great! I like the error approach too. And if we ever for whatever reason needed to share more details then we can just serialize more information. I'm approving, but also curious about what things will look like, say, if they write an erroneous compute shader.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. that looks cool. maybe useful for per-target customization
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Stefterv
reviewed
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So this means we would need to poll the rust side for any errors?
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yup, this is a tedious consequence of ffi code. there are a few different c-style error patterns you can use, but they're all pretty manual. rust exceptions (panics) can't cross the ffi boundary (doing so is undefined behavior). realistically, we'll probably only end up having like 20ish ffi functions. if we had hundreds, i'd suggest writing an annotation processor or some other kind of reflection magic in java to automate this.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Okay and there is no way from Rust to push an event into Java?
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Member
Author
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
catilac
added a commit
that referenced
this pull request
* *:ꔫ:*Renderer Project*:ꔫ:* * Create workspaces for ffi and the renderer (#1275) * Inital scaffold for libprocessing ffi. * Remove EAP. * Update docs. * Factor out gradle utils. Add flag for disabling webgpu and enforcing android source level compat. * Remove processing.h * Set java version for all projects. * libprocessing ffi error handling (#1293) * FFI error setup * Clear before init. * Basic app lifecycle / surface creation. * Throw when not on macos. * Implement `background` method (#1308) * Implement background. * Install wayland deps. * Support for windows surfaces. (#1310) * Implement basic rendering flow (#1322) * Implement basic rendering flow * Fix naming. * Actually fix rename. * libprocessing submodule * --recursive when cloning repo * Enable submodule checkout in Gradle workflow Added support for submodules in the checkout step. * Enable submodules in checkout steps Added submodule support to the checkout steps. * Wayland support with new WebGPU renderer * Gradle fixes from libprocessing refactor. (#1346) * Updates from libprocessing. (#1392) * Updates from libprocessing. * Fixes for compat with main 17. * Fixup docs. * Upgrade to jdk-25. * Upgrade to jdk-25. * Materials, lights, input event forwarding, ellipse fix. * Get the gradle sketch runner working locally. * Conditionally execute webgpu tests * ProcessingLibraryPlugin JVM Toggle update * 4.5.5 in gradle.properties * ProcessingPlugin fixes --------- Co-authored-by: Moon D. <[email protected]> Co-authored-by: Moon <[email protected]> Co-authored-by: Stef Tervelde <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Reviewers+1 more reviewerUh oh!
There was an error while loading. Please reload this page. AssigneesNo one assignedLabels
None yet
ProjectsMilestoneNo milestoneDevelopmentSuccessfully merging this pull request may close these issues. Uh oh!
There was an error while loading. Please reload this page. Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later. | |||||||||||||||||||||||||||||||||||||
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |