@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.
- package/LICENSE +20 -0
- package/README.md +15 -0
- package/android/CMakeLists.txt +78 -0
- package/android/build.gradle +143 -0
- package/android/cpp-adapter.cpp +63 -0
- package/android/generated/java/dev/eatsteak/rusaint/reactnative/NativeReactNativeSpec.java +41 -0
- package/android/generated/jni/CMakeLists.txt +36 -0
- package/android/generated/jni/RNReactNativeSpec-generated.cpp +38 -0
- package/android/generated/jni/RNReactNativeSpec.h +31 -0
- package/android/generated/jni/react/renderer/components/RNReactNativeSpec/RNReactNativeSpecJSI-generated.cpp +32 -0
- package/android/generated/jni/react/renderer/components/RNReactNativeSpec/RNReactNativeSpecJSI.h +80 -0
- package/android/gradle.properties +5 -0
- package/android/src/main/AndroidManifest.xml +5 -0
- package/android/src/main/java/dev/eatsteak/rusaint/reactnative/ReactNativeModule.kt +43 -0
- package/android/src/main/java/dev/eatsteak/rusaint/reactnative/ReactNativePackage.kt +34 -0
- package/android/src/main/jniLibs/arm64-v8a/librusaint_ffi.a +0 -0
- package/android/src/main/jniLibs/armeabi-v7a/librusaint_ffi.a +0 -0
- package/android/src/main/jniLibs/x86/librusaint_ffi.a +0 -0
- package/android/src/main/jniLibs/x86_64/librusaint_ffi.a +0 -0
- package/build/RusaintReactNativeFramework.xcframework/Info.plist +43 -0
- package/build/RusaintReactNativeFramework.xcframework/ios-arm64/librusaint_ffi.a +0 -0
- package/build/RusaintReactNativeFramework.xcframework/ios-arm64-simulator/librusaint_ffi.a +0 -0
- package/cpp/generated/rusaint.cpp +2485 -0
- package/cpp/generated/rusaint.hpp +168 -0
- package/cpp/generated/rusaint_ffi.cpp +7397 -0
- package/cpp/generated/rusaint_ffi.hpp +873 -0
- package/cpp/rusaint-react-native.cpp +18 -0
- package/cpp/rusaint-react-native.h +15 -0
- package/ios/ReactNative.h +16 -0
- package/ios/ReactNative.mm +66 -0
- package/ios/generated/RNReactNativeSpec/RNReactNativeSpec-generated.mm +46 -0
- package/ios/generated/RNReactNativeSpec/RNReactNativeSpec.h +63 -0
- package/ios/generated/RNReactNativeSpecJSI-generated.cpp +32 -0
- package/ios/generated/RNReactNativeSpecJSI.h +80 -0
- package/lib/commonjs/NativeReactNative.ts +10 -0
- package/lib/commonjs/generated/rusaint-ffi.js +44 -0
- package/lib/commonjs/generated/rusaint-ffi.js.map +1 -0
- package/lib/commonjs/generated/rusaint.js +3232 -0
- package/lib/commonjs/generated/rusaint.js.map +1 -0
- package/lib/commonjs/generated/rusaint_ffi-ffi.js +44 -0
- package/lib/commonjs/generated/rusaint_ffi-ffi.js.map +1 -0
- package/lib/commonjs/generated/rusaint_ffi.js +2493 -0
- package/lib/commonjs/generated/rusaint_ffi.js.map +1 -0
- package/lib/commonjs/index.js +68 -0
- package/lib/commonjs/index.js.map +1 -0
- package/lib/commonjs/package.json +1 -0
- package/lib/module/NativeReactNative.ts +10 -0
- package/lib/module/generated/rusaint-ffi.js +43 -0
- package/lib/module/generated/rusaint-ffi.js.map +1 -0
- package/lib/module/generated/rusaint.js +3226 -0
- package/lib/module/generated/rusaint.js.map +1 -0
- package/lib/module/generated/rusaint_ffi-ffi.js +43 -0
- package/lib/module/generated/rusaint_ffi-ffi.js.map +1 -0
- package/lib/module/generated/rusaint_ffi.js +2469 -0
- package/lib/module/generated/rusaint_ffi.js.map +1 -0
- package/lib/module/index.js +40 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/package.json +1 -0
- package/lib/typescript/commonjs/src/NativeReactNative.d.ts +8 -0
- package/lib/typescript/commonjs/src/NativeReactNative.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/generated/rusaint-ffi.d.ts +109 -0
- package/lib/typescript/commonjs/src/generated/rusaint-ffi.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/generated/rusaint.d.ts +2330 -0
- package/lib/typescript/commonjs/src/generated/rusaint.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/generated/rusaint_ffi-ffi.d.ts +300 -0
- package/lib/typescript/commonjs/src/generated/rusaint_ffi-ffi.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/generated/rusaint_ffi.d.ts +1111 -0
- package/lib/typescript/commonjs/src/generated/rusaint_ffi.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/index.d.ts +10 -0
- package/lib/typescript/commonjs/src/index.d.ts.map +1 -0
- package/package.json +185 -0
- package/react-native.config.js +12 -0
- package/rusaint-react-native.podspec +44 -0
- package/src/NativeReactNative.ts +10 -0
- package/src/generated/rusaint-ffi.ts +276 -0
- package/src/generated/rusaint.ts +4867 -0
- package/src/generated/rusaint_ffi-ffi.ts +832 -0
- package/src/generated/rusaint_ffi.ts +5519 -0
- 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
|
+
|