You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add init(unsafelyCopying:JSObject) on @JS struct #510
There's an opinion that such struct should follow value semantics, for which it has to copy its property values out to Wasm linear memory out of JS. To control copying strategies we might consider adding an argument to @JS controlling this, i.e. @JS(copy: .lazy), @JS(copy: .eager).
In the long term we should also support @JS struct Foo: ~Copyable that avoids copies altogether and always gives access to backing JS object reference.
changed the title [-]Make `init(unsafelyWrapping:JSObject` available on `@JS struct` declarations[/-][+]Make `init(unsafelyWrapping:JSObject` available on `@JS struct`[/+]on Jan 22, 2026
changed the title [-]Make `init(unsafelyWrapping:JSObject` available on `@JS struct`[/-][+]Make `init(unsafelyWrapping:JSObject)` available on `@JS struct`[/+]on Jan 22, 2026
changed the title [-]Make `init(unsafelyWrapping:JSObject)` available on `@JS struct`[/-][+]Add `init(unsafelyWrapping:JSObject)` on `@JS struct`[/+]on Jan 22, 2026
changed the title [-]Add `init(unsafelyWrapping:JSObject)` on `@JS struct`[/-][+]Add `init(unsafelyCopying:JSObject)` on `@JS struct`[/+]on Jan 26, 2026
Activity
[-]Make `init(unsafelyWrapping:JSObject` available on `@JS struct` declarations[/-][+]Make `init(unsafelyWrapping:JSObject` available on `@JS struct`[/+][-]Make `init(unsafelyWrapping:JSObject` available on `@JS struct`[/-][+]Make `init(unsafelyWrapping:JSObject)` available on `@JS struct`[/+][-]Make `init(unsafelyWrapping:JSObject)` available on `@JS struct`[/-][+]Add `init(unsafelyWrapping:JSObject)` on `@JS struct`[/+][-]Add `init(unsafelyWrapping:JSObject)` on `@JS struct`[/-][+]Add `init(unsafelyCopying:JSObject)` on `@JS struct`[/+]