-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into johannes/rinja
- Loading branch information
Showing
157 changed files
with
5,131 additions
and
791 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: Publish to CocoaPods | ||
|
||
on: | ||
release: | ||
types: [published] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
publish-cocoapods: | ||
runs-on: macos-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Ruby | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: "3.3" | ||
|
||
- name: Install CocoaPods | ||
run: gem install cocoapods | ||
|
||
- name: Lint Podspec | ||
run: pod spec lint uniffi-bindgen-react-native.podspec | ||
|
||
- name: Publish to CocoaPods | ||
env: | ||
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }} | ||
run: pod trunk push uniffi-bindgen-react-native.podspec |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
name: Compat | ||
|
||
on: | ||
schedule: | ||
- cron: "0 0 * * *" # Once a day at midnight | ||
pull_request: | ||
branches: ["main"] | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
|
||
jobs: | ||
integration-tests-generation: | ||
strategy: | ||
matrix: | ||
runner: | ||
- macos-latest | ||
- ubuntu-latest | ||
bob-version: | ||
- 0.42.2 | ||
- 0.42.3 | ||
- latest | ||
rn-version: | ||
- 0.76.0 | ||
- latest | ||
|
||
runs-on: ${{ matrix.runner }} | ||
name: "bob ${{ matrix.bob-version }} / rn ${{ matrix.rn-version }} / ${{ matrix.runner == 'macos-latest' && 'ios' || 'android' }}" | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Install cargo-ndk | ||
if: ${{ matrix.runner != 'macos-latest' }} | ||
run: | | ||
cargo install cargo-ndk | ||
- name: Install JDK | ||
if: ${{ matrix.runner != 'macos-latest' }} | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: "zulu" | ||
java-version: "17" | ||
|
||
- name: Install Rust toolchains | ||
uses: dtolnay/rust-toolchain@stable | ||
with: | ||
targets: ${{ matrix.runner == 'macos-latest' && 'aarch64-apple-ios-sim' || 'aarch64-linux-android' }} | ||
|
||
- name: Generate & build turbo module | ||
run: | | ||
./scripts/test-turbo-modules.sh \ | ||
--slug '@my-org/my-lib' \ | ||
--ubrn-config integration/fixtures/compat/ubrn.config.yaml \ | ||
--builder-bob-version ${{ matrix.bob-version }} \ | ||
--rn-version ${{ matrix.rn-version }} \ | ||
--packgage-json-mixin integration/fixtures/compat/package.json \ | ||
--react-native-config integration/fixtures/compat/react-native.config.js \ | ||
--${{ matrix.runner == 'macos-latest' && 'ios' || 'android' }} \ | ||
../turbo-module |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
name: Publish to npmjs | ||
on: | ||
release: | ||
types: [published] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
publish-npmjs: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
id-token: write | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: "20.x" | ||
registry-url: "https://registry.npmjs.org" | ||
- run: npm install | ||
- run: npm publish --provenance --access public | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Upcoming releases | ||
|
||
## 🦊 What's Changed | ||
* Switched from passing `ArrayBuffer`s to using `Uint8Array`, to accommodate WASM better. ([#187](https://github.com/jhugman/uniffi-bindgen-react-native/pull/187)) | ||
|
||
**Full Changelog**: https://github.com/jhugman/uniffi-bindgen-react-native/compare/0.28.3-1...main | ||
|
||
# 0.28.3-1 | ||
|
||
This is the first supported release of the `uniffi-bindgen-react-native`. Please hack responsibly. Share and enjoy. | ||
|
||
## 🦊 What's Changed | ||
* Handle type parameter change in crnl 0.45.1 ([#182](https://github.com/jhugman/uniffi-bindgen-react-native/pull/182)) | ||
* Make first run more informative while compiling ([#185](https://github.com/jhugman/uniffi-bindgen-react-native/pull/185)) | ||
* Initial refactor in preparing for WASM ([#174](https://github.com/jhugman/uniffi-bindgen-react-native/pull/174)) | ||
* Add callbacks-example fixture from uniffi-rs ([#172](https://github.com/jhugman/uniffi-bindgen-react-native/pull/172)) | ||
* Fix CLI working without an extension ([#183](https://github.com/jhugman/uniffi-bindgen-react-native/pull/183)) | ||
* Use version released to Cocoapods and npm ([#184](https://github.com/jhugman/uniffi-bindgen-react-native/pull/184)) | ||
|
||
**Full Changelog**: https://github.com/jhugman/uniffi-bindgen-react-native/compare/0.28.3-0...0.28.3-1 | ||
|
||
/* | ||
## ✨ What's New | ||
|
||
## 🦊 What's Changed | ||
|
||
## ⚠️ Breaking Changes | ||
|
||
**Full Changelog**: https://github.com/jhugman/uniffi-bindgen-react-native/compare/{{previous}}...{{current}} | ||
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/* | ||
* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this | ||
* file, You can obtain one at http://mozilla.org/MPL/2.0/ | ||
*/ | ||
#pragma once | ||
|
||
#include "Bridging.h" | ||
#include <jsi/jsi.h> | ||
|
||
namespace uniffi_jsi { | ||
using namespace facebook; | ||
|
||
template <> struct Bridging<jsi::ArrayBuffer> { | ||
static jsi::ArrayBuffer value_to_arraybuffer(jsi::Runtime &rt, | ||
const jsi::Value &value) { | ||
try { | ||
return value.asObject(rt) | ||
.getPropertyAsObject(rt, "buffer") | ||
.getArrayBuffer(rt); | ||
} catch (const std::logic_error &e) { | ||
throw jsi::JSError(rt, e.what()); | ||
} | ||
} | ||
|
||
static jsi::Value arraybuffer_to_value(jsi::Runtime &rt, | ||
const jsi::ArrayBuffer &arrayBuffer) { | ||
try { | ||
jsi::Object obj(rt); | ||
obj.setProperty(rt, "buffer", arrayBuffer); | ||
return jsi::Value(rt, obj); | ||
} catch (const std::logic_error &e) { | ||
throw jsi::JSError(rt, e.what()); | ||
} | ||
} | ||
}; | ||
|
||
} // namespace uniffi_jsi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.