@bennyblader/ddk-rn 0.3.43 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/DdkRn.podspec +1 -1
  2. package/README.md +14 -0
  3. package/android/CMakeLists.txt +6 -3
  4. package/android/build.gradle +0 -1
  5. package/android/cpp-adapter.cpp +6 -26
  6. package/android/src/main/jniLibs/arm64-v8a/libddk_ffi.so +0 -0
  7. package/android/src/main/jniLibs/armeabi-v7a/libddk_ffi.so +0 -0
  8. package/android/src/main/jniLibs/x86/libddk_ffi.so +0 -0
  9. package/android/src/main/jniLibs/x86_64/libddk_ffi.so +0 -0
  10. package/cpp/bennyblader-ddk-rn.cpp +1 -1
  11. package/cpp/ddk_ffi.cpp +2361 -2671
  12. package/cpp/ddk_ffi.hpp +86 -255
  13. package/ios/DdkRn.xcframework/Info.plist +43 -0
  14. package/ios/DdkRn.xcframework/ios-arm64/libddk_ffi.a +0 -0
  15. package/ios/DdkRn.xcframework/ios-arm64-simulator/libddk_ffi.a +0 -0
  16. package/lib/commonjs/ddk_ffi-ffi.js +6 -29
  17. package/lib/commonjs/ddk_ffi-ffi.js.map +1 -1
  18. package/lib/commonjs/ddk_ffi.js +961 -944
  19. package/lib/commonjs/ddk_ffi.js.map +1 -1
  20. package/lib/module/ddk_ffi-ffi.js +6 -29
  21. package/lib/module/ddk_ffi-ffi.js.map +1 -1
  22. package/lib/module/ddk_ffi.js +924 -896
  23. package/lib/module/ddk_ffi.js.map +1 -1
  24. package/lib/typescript/commonjs/src/ddk_ffi-ffi.d.ts +71 -96
  25. package/lib/typescript/commonjs/src/ddk_ffi-ffi.d.ts.map +1 -1
  26. package/lib/typescript/commonjs/src/ddk_ffi.d.ts +500 -471
  27. package/lib/typescript/commonjs/src/ddk_ffi.d.ts.map +1 -1
  28. package/lib/typescript/module/src/ddk_ffi-ffi.d.ts +71 -96
  29. package/lib/typescript/module/src/ddk_ffi-ffi.d.ts.map +1 -1
  30. package/lib/typescript/module/src/ddk_ffi.d.ts +500 -471
  31. package/lib/typescript/module/src/ddk_ffi.d.ts.map +1 -1
  32. package/package.json +8 -38
  33. package/src/ddk_ffi-ffi.ts +419 -170
  34. package/src/ddk_ffi.ts +2648 -1939
  35. package/ubrn.config.yaml +18 -1
  36. package/ddk-ffi/Cargo.lock +0 -1013
  37. package/ddk-ffi/Cargo.toml +0 -36
  38. package/ddk-ffi/build.rs +0 -3
  39. package/ddk-ffi/rust-toolchain.toml +0 -10
  40. package/ddk-ffi/src/ddk_ffi.udl +0 -376
  41. package/ddk-ffi/src/lib.rs +0 -2509
  42. package/ddk-ffi/src/uniffi-bindgen.rs +0 -3
  43. package/ddk-ffi/uniffi.toml +0 -18
  44. package/scripts/apply-hotfix.js +0 -96
  45. package/scripts/postinstall.js +0 -298
  46. package/scripts/prepare-rust-src.js +0 -51
package/ubrn.config.yaml CHANGED
@@ -9,13 +9,30 @@ bindings:
9
9
  android:
10
10
  directory: android
11
11
  packageName: com.ddkrn
12
+ # Link Rust as a shared library rather than a static archive. These binaries
13
+ # ship in the npm package, and a static archive carries every object file
14
+ # whether or not anything references it: ~37MB per ABI, ~150MB across the four.
15
+ # A linked .so is roughly a tenth of that (measured on iOS: 37MB archive vs
16
+ # 3.7MB linked cdylib).
17
+ #
18
+ # Two constraints come with this and are both satisfied:
19
+ # * ddk-ffi's crate-type must include `cdylib` — it does.
20
+ # * The library must NOT be stripped, or ubrn's turbo-module and native
21
+ # bindings generation breaks. ddk-ffi declares no [profile.release], so
22
+ # cargo's default `strip = "none"` applies; do not add one. There is
23
+ # deliberately no strip step for Android in the justfile.
24
+ useSharedLibrary: true
12
25
 
13
26
  ios:
14
27
  directory: ios
28
+ # Each target adds a ~39MB (release, stripped) static archive to the npm
29
+ # package. x86_64-apple-ios — the Intel Mac simulator slice — is deliberately
30
+ # omitted: Apple Silicon has been the only Mac sold since 2023, and the slice
31
+ # costs every consumer a full extra archive. Re-add it here if an Intel Mac
32
+ # simulator ever needs supporting.
15
33
  targets:
16
34
  - aarch64-apple-ios
17
35
  - aarch64-apple-ios-sim
18
- - x86_64-apple-ios
19
36
  frameworkName: ios/DdkRn
20
37
 
21
38
  turboModule: