npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@bennyblader/ddk-rn

v0.3.33

Published

dlcdevkit bindings for react-native

Readme

@bennyblader/ddk-rn

React Native bindings for the DLC Dev Kit (DDK) - UniFFI-based native bindings for React Native applications.

Installation

npm install @bennyblader/ddk-rn
# or
pnpm add @bennyblader/ddk-rn

Quick Start

import { version, createFundTxLockingScript } from '@bennyblader/ddk-rn';

console.log(`DDK Version: ${version()}`);

For complete API documentation, see the main README.

Development

Prerequisites

  • Node.js >= 14
  • Rust >= 1.70
  • pnpm
  • UniFFI React Native: npm install -g uniffi-bindgen-react-native
  • iOS: Xcode 14+, CocoaPods
  • Android: Android Studio, NDK

Building from Source

# Install dependencies
pnpm install

# Generate all bindings and build native libraries
just uniffi

# Note: After building, manually fix the include path in cpp/bennyblader-ddk-rn.cpp
# Change: #include "/ddk_ffi.hpp"
# To: #include "ddk_ffi.hpp"

Just Commands

# Complete build (generates bindings + builds iOS/Android)
just uniffi

# Generate JSI bindings only
just uniffi-jsi

# Generate TurboModule specifications
just uniffi-turbo

# Build iOS libraries
just build-ios

# Build Android libraries
just build-android

# Setup example app
just example

# iOS example setup
just example-ios

# Android example build
just example-android

# Clean all generated files
just clean

# Release new version
just release

# Create release archives
just release-archives

Project Structure

ddk-rn/
├── src/                # Generated TypeScript bindings
│   ├── index.tsx       # Main entry point (generated)
│   └── ddk_ffi*.ts     # Type definitions (generated)
├── cpp/                # Generated C++ JSI bindings
│   ├── ddk_ffi.hpp     # C++ header (generated)
│   ├── ddk_ffi.cpp     # C++ implementation (generated)
│   └── *.cpp/.h        # TurboModule files (generated)
├── ios/                # iOS native module
│   ├── DdkRn.xcframework/ # iOS framework (generated)
│   └── *.swift/.m      # iOS bridge code
├── android/            # Android native module
│   └── src/main/
│       ├── java/       # Kotlin/Java bridge code
│       └── jniLibs/    # Native libraries (generated)
├── example/            # Example React Native app
├── scripts/            # Build and release scripts
└── ubrn.config.yaml    # UniFFI React Native configuration

Platform Support

| Platform | Architecture | Status | | ------------- | ------------ | ------------ | | iOS | ARM64 | ✅ Supported | | iOS Simulator | x64/ARM64 | ✅ Supported | | Android | ARM64-v8a | ✅ Supported | | Android | ARMv7 | ✅ Supported | | Android | x86_64 | ✅ Supported |

Building the Example App

iOS

# Install iOS dependencies with new architecture
just example-ios

# Run the app
cd example
npx react-native run-ios

Android

# Build Android app
just example-android

# Run the app
cd example
npx react-native run-android

Release Process

To release a new version:

just release

This will:

  1. Build all native bindings
  2. Run tests
  3. Update version
  4. Create release commit and tag
  5. Push to GitHub
  6. Publish to npm

API Compatibility

The React Native bindings maintain 100% API compatibility with the UniFFI definitions. All functions are generated directly from the UDL file ensuring consistency across platforms.

Known Issues

  1. Manual Include Path Fix: After running just uniffi, you must manually fix the include path in cpp/bennyblader-ddk-rn.cpp:

    • Change: #include "/ddk_ffi.hpp"
    • To: #include "ddk_ffi.hpp"
  2. New Architecture: The library requires React Native's new architecture to be enabled:

    • iOS: Set RCT_NEW_ARCH_ENABLED=1
    • Android: Set newArchEnabled=true in gradle.properties

Troubleshooting

iOS Build Issues

If you encounter build issues on iOS:

cd example/ios
pod deintegrate
pod install

Android Build Issues

Clean and rebuild Android:

cd example/android
./gradlew clean
./gradlew build

Missing Bindings

If bindings are missing, regenerate them:

just clean
just uniffi

License

MIT