Skip to content

Introduce BridgeJS, a declarative JS interop system #330

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Apr 8, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
[skip ci] Mention @dynamicMemberLookup-based APIs
It's still up to the user to decide which approach to use.
  • Loading branch information
kateinoigakukun committed Apr 2, 2025
commit 7309d97d63f87a9dce2e8d62aa5b4ae5a71eda3f
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,14 @@ Learn how to leverage TypeScript definitions to create type-safe bindings for Ja

BridgeJS enables seamless integration between Swift and JavaScript by automatically generating Swift bindings from TypeScript declaration files (`.d.ts`). This provides type-safe access to JavaScript APIs directly from your Swift code.

The key benefits of this approach include:
The key benefits of this approach over `@dynamicMemberLookup`-based APIs include:

- **Type Safety**: Catch errors at compile-time rather than runtime
- **IDE Support**: Get autocompletion and documentation in your Swift editor
- **Performance**: Eliminating dynamism allows us to optimize the glue code

If you prefer keeping your project simple, you can continue using `@dynamicMemberLookup`-based APIs.

## Getting Started

### Step 1: Configure Your Package
Expand Down