feat!: boundless interop by elringus · Pull Request #201 · elringus/bootsharp · GitHub
Skip to content

feat!: boundless interop#201

Merged
elringus merged 20 commits into
mainfrom
feat/modules
May 7, 2026
Merged

feat!: boundless interop#201
elringus merged 20 commits into
mainfrom
feat/modules

Conversation

@elringus

@elringus elringus commented May 7, 2026

Copy link
Copy Markdown
Owner

This resolves #153 by overhauling the way we handle values passed through the interop boundary:

  • Types with immutable semantics, such as structs, records and read-only collections are serialized and copied by value
  • Other non-primitive types (classes and interfaces) are considered mutable and passed by reference

Additionally, this PR:

  • Removes the limitation where "by-ref" types were only detected on the static interop boundary: now there is no limit on how deep such types can appear, as long as they are "user types" (BCL types are ignored to prevent leaking the whole .NET runtime into the generated interop layer)
  • Adds support for "by-ref" types inside serialized types; for example, a mutable class or interface can now appear inside a serialized struct, record or collection
  • Renames the concept of "static interfaces" to "modules" and removes the limitation where assembly-level [JSExport] attribute only accepted interfaces (it now works with non-static classes as well)

@elringus elringus added the enhancement New feature or enhancement label May 7, 2026
@codecov

codecov Bot commented May 7, 2026

Copy link
Copy Markdown

@elringus elringus merged commit 2097afb into main May 7, 2026
8 checks passed
@elringus elringus deleted the feat/modules branch May 7, 2026 20:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Explore easing interop instance limitations

1 participant