Skip to content

Conversation

@mrousavy
Copy link
Owner

@mrousavy mrousavy commented Oct 29, 2025

Rewrites the whole Swift HybridObject factory part to be a static class that receives this as a void* argument, keeping the entire Swift class unknown on the C++ side.

This hides the Swift inheritance from C++, so that we can inherit from any class and still use it in C++. Previously, if we inherit from a class that was imported from an external module, the build would fail because the external class could not be found (-Swift.h didn't import it).

Problem

This makes Nitro almost 70% slower.
In Benchmarks:

  • Before: 10ms
  • After: 17ms

@vercel
Copy link

vercel bot commented Oct 29, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Review Updated (UTC)
nitro-docs Skipped Skipped Jan 19, 2026 7:13pm

Request Review

@mrousavy mrousavy marked this pull request as draft October 29, 2025 20:46
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.

2 participants