Closed Bug 1843571 Opened 2 years ago Closed 2 years ago

Expose XPIDL CEnum constants to Rust

Categories

(Core :: XPCOM, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
117 Branch
Tracking Status
firefox117 --- fixed

People

(Reporter: nika, Assigned: nika)

Details

Attachments

(1 file, 2 obsolete files)

This isn't reflecting the CEnum as a rust enum as the semantics are different, however currently the constants aren't exposed into Rust in any way. We should expose them as normal associated constants simiilar to how they are handled in JS.

These are exposed as simple associated constants, similar to how they're
exposed in JS. We cannot use rust enums, as they have limited value
requirements, and cenum types are treated as arbitrary integers.

This attribute promises that the interface is threadsafe, and validates it with
some assertions in generated code. As these interfaces were already only
implemented in Rust code, and always threadsafe, the assertions were easy to
add as a example use-case for the new attributes.

Depends on D183593

Comment on attachment 9343916 [details]
Bug 1843571 - Part 4: Document the rust_sync attribute, r=#xpcom-reviewers!

Revision D183593 was moved to bug 1843568. Setting attachment 9343916 [details] to obsolete.

Attachment #9343916 - Attachment is obsolete: true

Comment on attachment 9343917 [details]
Bug 1843571 - Part 5: Mark some nsIKeyValue types as rust_sync, r=lina!

Revision D183594 was moved to bug 1843568. Setting attachment 9343917 [details] to obsolete.

Attachment #9343917 - Attachment is obsolete: true
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 117 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: