From 30869e29ed3c08cff0d68d17eeb4fe02a9b1a30a Mon Sep 17 00:00:00 2001 From: Snow Pettersen Date: Tue, 28 Jan 2025 09:13:20 -0500 Subject: [PATCH 1/2] react native: update Capture to 0.16.11 --- packages/react-native/BdReactNative.podspec | 2 +- packages/react-native/android/build.gradle | 2 +- packages/react-native/src/plugin/withAndroid.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/react-native/BdReactNative.podspec b/packages/react-native/BdReactNative.podspec index 100ee3d..c4de598 100644 --- a/packages/react-native/BdReactNative.podspec +++ b/packages/react-native/BdReactNative.podspec @@ -2,7 +2,7 @@ require "json" package = JSON.parse(File.read(File.join(__dir__, "package.json"))) folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32' -capture_version = '0.16.10' +capture_version = '0.16.11' Pod::Spec.new do |s| s.name = "BdReactNative" diff --git a/packages/react-native/android/build.gradle b/packages/react-native/android/build.gradle index ff77de0..9e2796d 100644 --- a/packages/react-native/android/build.gradle +++ b/packages/react-native/android/build.gradle @@ -112,7 +112,7 @@ dependencies { //noinspection GradleDynamicVersion implementation "com.facebook.react:react-native:+" implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" - api 'io.bitdrift:capture:0.16.10' + api 'io.bitdrift:capture:0.16.11' } if (isNewArchitectureEnabled()) { diff --git a/packages/react-native/src/plugin/withAndroid.ts b/packages/react-native/src/plugin/withAndroid.ts index 9ce9292..bc826d5 100644 --- a/packages/react-native/src/plugin/withAndroid.ts +++ b/packages/react-native/src/plugin/withAndroid.ts @@ -22,7 +22,7 @@ const withBitdriftAppBuildGradle: ConfigPlugin = ( // Add the capture-plugin at the very top of the file. config.modResults.contents = `plugins { - id 'io.bitdrift.capture-plugin' version '0.16.10' + id 'io.bitdrift.capture-plugin' version '0.16.11' } ` + config.modResults.contents; From c3be6118ffa1ba33c98a13264f28e8d1a195fcd2 Mon Sep 17 00:00:00 2001 From: Snow Pettersen Date: Tue, 28 Jan 2025 22:06:00 -0500 Subject: [PATCH 2/2] add a basic wasm erpo --- packages/wasm/Cargo.lock | 167 +++++++++++++++++++++++++++++++++++++++ packages/wasm/Cargo.toml | 11 +++ packages/wasm/index.html | 16 ++++ packages/wasm/src/lib.rs | 11 +++ 4 files changed, 205 insertions(+) create mode 100644 packages/wasm/Cargo.lock create mode 100644 packages/wasm/Cargo.toml create mode 100644 packages/wasm/index.html create mode 100644 packages/wasm/src/lib.rs diff --git a/packages/wasm/Cargo.lock b/packages/wasm/Cargo.lock new file mode 100644 index 0000000..e32495c --- /dev/null +++ b/packages/wasm/Cargo.lock @@ -0,0 +1,167 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "bumpalo" +version = "3.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1628fb46dfa0b37568d12e5edd512553eccf6a22a78e8bde00bb4aed84d5bdbf" + +[[package]] +name = "cfg-if" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" + +[[package]] +name = "js-sys" +version = "0.3.77" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1cfaf33c695fc6e08064efbc1f72ec937429614f25eef83af942d0e227c3a28f" +dependencies = [ + "once_cell", + "wasm-bindgen", +] + +[[package]] +name = "log" +version = "0.4.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04cbf5b083de1c7e0222a7a51dbfdba1cbe1c6ab0b15e29fff3f6c077fd9cd9f" + +[[package]] +name = "once_cell" +version = "1.20.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" + +[[package]] +name = "proc-macro2" +version = "1.0.93" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60946a68e5f9d28b0dc1c21bb8a97ee7d018a8b322fa57838ba31cc878e22d99" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "quote" +version = "1.0.38" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e4dccaaaf89514f546c693ddc140f729f958c247918a13380cccc6078391acc" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "rustversion" +version = "1.0.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7c45b9784283f1b2e7fb61b42047c2fd678ef0960d4f6f1eba131594cc369d4" + +[[package]] +name = "syn" +version = "2.0.96" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d5d0adab1ae378d7f53bdebc67a39f1f151407ef230f0ce2883572f5d8985c80" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "unicode-ident" +version = "1.0.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a210d160f08b701c8721ba1c726c11662f877ea6b7094007e1ca9a1041945034" + +[[package]] +name = "wasm" +version = "0.1.0" +dependencies = [ + "wasm-bindgen", + "wasm-bindgen-futures", +] + +[[package]] +name = "wasm-bindgen" +version = "0.2.100" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5" +dependencies = [ + "cfg-if", + "once_cell", + "rustversion", + "wasm-bindgen-macro", +] + +[[package]] +name = "wasm-bindgen-backend" +version = "0.2.100" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f0a0651a5c2bc21487bde11ee802ccaf4c51935d0d3d42a6101f98161700bc6" +dependencies = [ + "bumpalo", + "log", + "proc-macro2", + "quote", + "syn", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-futures" +version = "0.4.50" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "555d470ec0bc3bb57890405e5d4322cc9ea83cebb085523ced7be4144dac1e61" +dependencies = [ + "cfg-if", + "js-sys", + "once_cell", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.100" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7fe63fc6d09ed3792bd0897b314f53de8e16568c2b3f7982f468c0bf9bd0b407" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.100" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "wasm-bindgen-backend", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.100" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a05d73b933a847d6cccdda8f838a22ff101ad9bf93e33684f39c1f5f0eece3d" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "web-sys" +version = "0.3.77" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33b6dd2ef9186f1f2072e409e99cd22a975331a6b3591b12c764e0e55c60d5d2" +dependencies = [ + "js-sys", + "wasm-bindgen", +] diff --git a/packages/wasm/Cargo.toml b/packages/wasm/Cargo.toml new file mode 100644 index 0000000..581eb06 --- /dev/null +++ b/packages/wasm/Cargo.toml @@ -0,0 +1,11 @@ +[package] +edition = "2021" +name = "wasm" +version = "0.1.0" + +[lib] +crate-type = ["cdylib"] + +[dependencies] +wasm-bindgen = "0.2.100" +wasm-bindgen-futures = "0.4.50" diff --git a/packages/wasm/index.html b/packages/wasm/index.html new file mode 100644 index 0000000..c99131e --- /dev/null +++ b/packages/wasm/index.html @@ -0,0 +1,16 @@ + + + + + hello-wasm example + + + + + + diff --git a/packages/wasm/src/lib.rs b/packages/wasm/src/lib.rs new file mode 100644 index 0000000..de55f82 --- /dev/null +++ b/packages/wasm/src/lib.rs @@ -0,0 +1,11 @@ +use wasm_bindgen::prelude::*; + +#[wasm_bindgen] +extern "C" { + pub fn alert(s: &str); +} + +#[wasm_bindgen] +pub async fn run(name: &str) { + alert(&format!("Hello, {}!", name)); +}