@bennyblader/ddk-rn 0.2.2 → 0.2.3

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.
@@ -0,0 +1,23 @@
1
+ rust:
2
+ directory: ../ddk-ffi
3
+ manifestPath: Cargo.toml
4
+
5
+ bindings:
6
+ cpp: cpp
7
+ ts: src
8
+
9
+ android:
10
+ directory: android
11
+ packageName: com.ddkrn
12
+
13
+ ios:
14
+ directory: ios
15
+ targets:
16
+ - aarch64-apple-ios
17
+ - aarch64-apple-ios-sim
18
+ frameworkName: ios/DdkRn
19
+
20
+ turboModule:
21
+ cpp: cpp
22
+ ts: src
23
+ spec: NativeDdkRn
@@ -1,16 +0,0 @@
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
- }
@@ -1,15 +0,0 @@
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 */
@@ -1,10 +0,0 @@
1
- // Generated by uniffi-bindgen-react-native
2
- import type { TurboModule } from 'react-native';
3
- import { TurboModuleRegistry } from 'react-native';
4
-
5
- export interface Spec extends TurboModule {
6
- installRustCrate(): boolean;
7
- cleanupRustCrate(): boolean;
8
- }
9
-
10
- export default TurboModuleRegistry.getEnforcing<Spec>('DdkRn');
package/src/index.tsx DELETED
@@ -1,41 +0,0 @@
1
- // Generated by uniffi-bindgen-react-native
2
- import installer from './NativeDdkRn';
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 './/ddk_ffi';
15
-
16
- // Now import the bindings so we can:
17
- // - intialize them
18
- // - export them as namespaced objects as the default export.
19
- import * as ddk_ffi from './/ddk_ffi';
20
-
21
- // Initialize the generated bindings: mostly checksums, but also callbacks.
22
- // - the boolean flag ensures this loads exactly once, even if the JS code
23
- // is reloaded (e.g. during development with metro).
24
- let initialized = false;
25
- if (!initialized) {
26
- ddk_ffi.default.initialize();
27
- initialized = true;
28
- }
29
-
30
- // This provides parity with the index.web.ts version of this file.
31
- // The web version relies on an asynchronous fetch, which this doesn't
32
- // need, so we just no-op.
33
- export async function uniffiInitAsync() {
34
- // NOOP.
35
- }
36
-
37
- // Export the crates as individually namespaced objects.
38
- export default {
39
- ddk_ffi,
40
- };
41
-