nitro icon indicating copy to clipboard operation
nitro copied to clipboard

Feat/black voodoo magic swift voidptr

Open mrousavy opened this issue 2 months ago • 1 comments

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

mrousavy avatar Oct 29 '25 20:10 mrousavy

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

1 Skipped Deployment
Project Deployment Preview Comments Updated (UTC)
nitro-docs Skipped Skipped Oct 30, 2025 1:16pm

vercel[bot] avatar Oct 29 '25 20:10 vercel[bot]