@bennyblader/ddk-rn 0.2.3 → 0.2.5
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/android/build.gradle +1 -0
- package/cpp/bennyblader-ddk-rn.cpp +16 -0
- package/cpp/bennyblader-ddk-rn.h +15 -0
- package/ddk-ffi/Cargo.lock +1096 -0
- package/ddk-ffi/Cargo.toml +31 -0
- package/ddk-ffi/build.rs +3 -0
- package/ddk-ffi/rust-toolchain.toml +10 -0
- package/ddk-ffi/scratchpad.txt +243 -0
- package/ddk-ffi/src/ddk_ffi.udl +230 -0
- package/ddk-ffi/src/lib.rs +1093 -0
- package/ddk-ffi/src/uniffi-bindgen.rs +3 -0
- package/ddk-ffi/uniffi.toml +18 -0
- package/package.json +6 -5
- package/scripts/postinstall.js +67 -59
- package/scripts/prepare-rust-src.js +51 -0
- package/src/NativeDdkRn.ts +10 -0
- package/src/index.tsx +41 -0
package/android/build.gradle
CHANGED
|
@@ -133,6 +133,7 @@ dependencies {
|
|
|
133
133
|
//noinspection GradleDynamicVersion
|
|
134
134
|
implementation "com.facebook.react:react-native:+"
|
|
135
135
|
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
|
136
|
+
implementation "net.java.dev.jna:jna:5.17.0@aar"
|
|
136
137
|
}
|
|
137
138
|
|
|
138
139
|
if (isNewArchitectureEnabled()) {
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// Generated by uniffi-bindgen-react-native
|
|
2
|
+
#include "bennyblader-ddk-rn.h"
|
|
3
|
+
#include "/ddk_ffi.hpp"
|
|
4
|
+
|
|
5
|
+
namespace bennyblader_ddkrn {
|
|
6
|
+
using namespace facebook;
|
|
7
|
+
|
|
8
|
+
uint8_t installRustCrate(jsi::Runtime &runtime, std::shared_ptr<react::CallInvoker> callInvoker) {
|
|
9
|
+
NativeDdkFfi::registerModule(runtime, callInvoker);
|
|
10
|
+
return true;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
uint8_t cleanupRustCrate(jsi::Runtime &runtime) {
|
|
14
|
+
return false;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
#ifndef BENNYBLADER_DDKRN_H
|
|
2
|
+
#define BENNYBLADER_DDKRN_H
|
|
3
|
+
// Generated by uniffi-bindgen-react-native
|
|
4
|
+
#include <cstdint>
|
|
5
|
+
#include <jsi/jsi.h>
|
|
6
|
+
#include <ReactCommon/CallInvoker.h>
|
|
7
|
+
|
|
8
|
+
namespace bennyblader_ddkrn {
|
|
9
|
+
using namespace facebook;
|
|
10
|
+
|
|
11
|
+
uint8_t installRustCrate(jsi::Runtime &runtime, std::shared_ptr<react::CallInvoker> callInvoker);
|
|
12
|
+
uint8_t cleanupRustCrate(jsi::Runtime &runtime);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
#endif /* BENNYBLADER_DDKRN_H */
|