@rusaint/react-native 0.10.0-dev.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 (79) hide show
  1. package/LICENSE +20 -0
  2. package/README.md +15 -0
  3. package/android/CMakeLists.txt +78 -0
  4. package/android/build.gradle +143 -0
  5. package/android/cpp-adapter.cpp +63 -0
  6. package/android/generated/java/dev/eatsteak/rusaint/reactnative/NativeReactNativeSpec.java +41 -0
  7. package/android/generated/jni/CMakeLists.txt +36 -0
  8. package/android/generated/jni/RNReactNativeSpec-generated.cpp +38 -0
  9. package/android/generated/jni/RNReactNativeSpec.h +31 -0
  10. package/android/generated/jni/react/renderer/components/RNReactNativeSpec/RNReactNativeSpecJSI-generated.cpp +32 -0
  11. package/android/generated/jni/react/renderer/components/RNReactNativeSpec/RNReactNativeSpecJSI.h +80 -0
  12. package/android/gradle.properties +5 -0
  13. package/android/src/main/AndroidManifest.xml +5 -0
  14. package/android/src/main/java/dev/eatsteak/rusaint/reactnative/ReactNativeModule.kt +43 -0
  15. package/android/src/main/java/dev/eatsteak/rusaint/reactnative/ReactNativePackage.kt +34 -0
  16. package/android/src/main/jniLibs/arm64-v8a/librusaint_ffi.a +0 -0
  17. package/android/src/main/jniLibs/armeabi-v7a/librusaint_ffi.a +0 -0
  18. package/android/src/main/jniLibs/x86/librusaint_ffi.a +0 -0
  19. package/android/src/main/jniLibs/x86_64/librusaint_ffi.a +0 -0
  20. package/build/RusaintReactNativeFramework.xcframework/Info.plist +43 -0
  21. package/build/RusaintReactNativeFramework.xcframework/ios-arm64/librusaint_ffi.a +0 -0
  22. package/build/RusaintReactNativeFramework.xcframework/ios-arm64-simulator/librusaint_ffi.a +0 -0
  23. package/cpp/generated/rusaint.cpp +2485 -0
  24. package/cpp/generated/rusaint.hpp +168 -0
  25. package/cpp/generated/rusaint_ffi.cpp +7397 -0
  26. package/cpp/generated/rusaint_ffi.hpp +873 -0
  27. package/cpp/rusaint-react-native.cpp +18 -0
  28. package/cpp/rusaint-react-native.h +15 -0
  29. package/ios/ReactNative.h +16 -0
  30. package/ios/ReactNative.mm +66 -0
  31. package/ios/generated/RNReactNativeSpec/RNReactNativeSpec-generated.mm +46 -0
  32. package/ios/generated/RNReactNativeSpec/RNReactNativeSpec.h +63 -0
  33. package/ios/generated/RNReactNativeSpecJSI-generated.cpp +32 -0
  34. package/ios/generated/RNReactNativeSpecJSI.h +80 -0
  35. package/lib/commonjs/NativeReactNative.ts +10 -0
  36. package/lib/commonjs/generated/rusaint-ffi.js +44 -0
  37. package/lib/commonjs/generated/rusaint-ffi.js.map +1 -0
  38. package/lib/commonjs/generated/rusaint.js +3232 -0
  39. package/lib/commonjs/generated/rusaint.js.map +1 -0
  40. package/lib/commonjs/generated/rusaint_ffi-ffi.js +44 -0
  41. package/lib/commonjs/generated/rusaint_ffi-ffi.js.map +1 -0
  42. package/lib/commonjs/generated/rusaint_ffi.js +2493 -0
  43. package/lib/commonjs/generated/rusaint_ffi.js.map +1 -0
  44. package/lib/commonjs/index.js +68 -0
  45. package/lib/commonjs/index.js.map +1 -0
  46. package/lib/commonjs/package.json +1 -0
  47. package/lib/module/NativeReactNative.ts +10 -0
  48. package/lib/module/generated/rusaint-ffi.js +43 -0
  49. package/lib/module/generated/rusaint-ffi.js.map +1 -0
  50. package/lib/module/generated/rusaint.js +3226 -0
  51. package/lib/module/generated/rusaint.js.map +1 -0
  52. package/lib/module/generated/rusaint_ffi-ffi.js +43 -0
  53. package/lib/module/generated/rusaint_ffi-ffi.js.map +1 -0
  54. package/lib/module/generated/rusaint_ffi.js +2469 -0
  55. package/lib/module/generated/rusaint_ffi.js.map +1 -0
  56. package/lib/module/index.js +40 -0
  57. package/lib/module/index.js.map +1 -0
  58. package/lib/module/package.json +1 -0
  59. package/lib/typescript/commonjs/src/NativeReactNative.d.ts +8 -0
  60. package/lib/typescript/commonjs/src/NativeReactNative.d.ts.map +1 -0
  61. package/lib/typescript/commonjs/src/generated/rusaint-ffi.d.ts +109 -0
  62. package/lib/typescript/commonjs/src/generated/rusaint-ffi.d.ts.map +1 -0
  63. package/lib/typescript/commonjs/src/generated/rusaint.d.ts +2330 -0
  64. package/lib/typescript/commonjs/src/generated/rusaint.d.ts.map +1 -0
  65. package/lib/typescript/commonjs/src/generated/rusaint_ffi-ffi.d.ts +300 -0
  66. package/lib/typescript/commonjs/src/generated/rusaint_ffi-ffi.d.ts.map +1 -0
  67. package/lib/typescript/commonjs/src/generated/rusaint_ffi.d.ts +1111 -0
  68. package/lib/typescript/commonjs/src/generated/rusaint_ffi.d.ts.map +1 -0
  69. package/lib/typescript/commonjs/src/index.d.ts +10 -0
  70. package/lib/typescript/commonjs/src/index.d.ts.map +1 -0
  71. package/package.json +185 -0
  72. package/react-native.config.js +12 -0
  73. package/rusaint-react-native.podspec +44 -0
  74. package/src/NativeReactNative.ts +10 -0
  75. package/src/generated/rusaint-ffi.ts +276 -0
  76. package/src/generated/rusaint.ts +4867 -0
  77. package/src/generated/rusaint_ffi-ffi.ts +832 -0
  78. package/src/generated/rusaint_ffi.ts +5519 -0
  79. package/src/index.tsx +38 -0
package/src/index.tsx ADDED
@@ -0,0 +1,38 @@
1
+ // Generated by uniffi-bindgen-react-native
2
+ import installer from './NativeReactNative';
3
+
4
+ // Register the rust crate with Hermes
5
+ // - the boolean flag ensures this loads exactly once, even if the JS
6
+ // code is reloaded (e.g. during development with metro).
7
+ let rustInstalled = false;
8
+ if (!rustInstalled) {
9
+ installer.installRustCrate();
10
+ rustInstalled = true;
11
+ }
12
+
13
+ // Export the generated bindings to the app.
14
+ export * from './generated/rusaint';
15
+ export * from './generated/rusaint_ffi';
16
+
17
+ // Now import the bindings so we can:
18
+ // - intialize them
19
+ // - export them as namespaced objects as the default export.
20
+ import * as rusaint from './generated/rusaint';
21
+ import * as rusaint_ffi from './generated/rusaint_ffi';
22
+
23
+ // Initialize the generated bindings: mostly checksums, but also callbacks.
24
+ // - the boolean flag ensures this loads exactly once, even if the JS code
25
+ // is reloaded (e.g. during development with metro).
26
+ let initialized = false;
27
+ if (!initialized) {
28
+ rusaint.default.initialize();
29
+ rusaint_ffi.default.initialize();
30
+ initialized = true;
31
+ }
32
+
33
+ // Export the crates as individually namespaced objects.
34
+ export default {
35
+ rusaint,
36
+ rusaint_ffi,
37
+ };
38
+