Skip to content
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

Changes for the 0.27.2 #2102

Merged
merged 3 commits into from
May 14, 2024
Merged

Changes for the 0.27.2 #2102

merged 3 commits into from
May 14, 2024

Conversation

bendk
Copy link
Contributor

@bendk bendk commented May 10, 2024

I'm hoping to get these changes released so that Firefox can consume them. Does this make sense for a 0.27.2 release? Are there any other changes that should go in there?

These are alternate versions of the current scaffolding functions that
use u64 buffers to handle their input/output.

The main use case is the gecko-js bindings used in Firefox.  This allows
us to replace the generated C++ code with static code, since the
scaffolding functions now always have the exact same signature.

This commit generates FFI buffer versions for scaffolding functions
defined for user functions/methods.  It does not generate them for
functions with known/static signatures like the rust buffer FFI
functions, or the object clone/delete functions.  If the signature is
always the same, then there isn't a problem calling the normal
scaffolding functions.
@bendk bendk requested a review from a team as a code owner May 10, 2024 13:58
@bendk bendk requested review from mhammond and removed request for a team May 10, 2024 13:58
@bendk bendk force-pushed the release-0.27.x branch from 4df16c7 to 5694d3a Compare May 10, 2024 14:04
bendk added 2 commits May 10, 2024 10:10
This is needed because we haven't merged
mozilla#2083 into the branch.

Also:
  - Added a changelog entry.
  - Added a `#[allow(unknown_lints)]`, since
    `clippy::needless_borrows_for_generic_args` is not available on the
    older Rust version used in this branch.
Implemented our own oneshot channel using a Mutex.  It's not quite as
efficient as the `oneshot` one, but I think it should be fine for our
purposes.  My gut feeling is that the loss of overhead is neglibable
compared the other existing overhead that UniFFI adds.

The API of the new oneshot is basically the same, except send/recv are
not failable.
@bendk bendk force-pushed the release-0.27.x branch from 5694d3a to 91243c0 Compare May 10, 2024 14:10
Copy link
Member

@mhammond mhammond left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

huh, thanks for the effort of backporting these changes.

@bendk bendk changed the base branch from main to release-v0.27.x May 10, 2024 19:41
@skeet70
Copy link
Contributor

skeet70 commented May 13, 2024

I think @giarc3 was waiting for a release with #2088. Was there anything else you wanted to see in a release?

@bendk
Copy link
Contributor Author

bendk commented May 14, 2024

That fix is going to be hard to get in to the 0.27.x branch. It's based on top of #2075, which itself is based on top of #2074 and #2072. I think that one should wait until the 0.28.0 release, which we could also do fairly soon.

@bendk bendk merged commit fe45fea into mozilla:release-v0.27.x May 14, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants