Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
102 commits
Select commit Hold shift + click to select a range
f8bf6d7
feat: Move everything into `package/`
mrousavy May 10, 2024
a39ab21
Update Podfile.lock
mrousavy May 10, 2024
efbf23e
Create .gitignore
mrousavy May 13, 2024
23b06b3
Update .gitignore
mrousavy May 15, 2024
5d7c8b7
feat: Upgrade Android to new arch C++ only
mrousavy May 15, 2024
4f48e8f
Create C++ loader
mrousavy May 15, 2024
eed7c0f
fix: Fix configs
mrousavy May 15, 2024
2fc4b4e
Update react-native.config.js
mrousavy May 15, 2024
c4d3d8a
Update package.json
mrousavy May 15, 2024
a37b3af
Update useRunOnJS.ts
mrousavy May 15, 2024
d2f184b
Update package.json
mrousavy May 15, 2024
58d75aa
Rename
mrousavy May 15, 2024
6854053
chore: release 2.0.0-beta.1
mrousavy May 15, 2024
84fb2d2
Export Worklets
mrousavy May 15, 2024
25c0c7f
fix: Update CI paths
mrousavy May 15, 2024
09eb3bd
fix: Fix CI
mrousavy May 15, 2024
651f4ac
Remove JSC for simplicity
mrousavy May 15, 2024
0bfd8cc
feat: Upgrade Example app
mrousavy May 15, 2024
1030273
feat: Create `NativeWorkletsModule` CXX
mrousavy May 15, 2024
a40ee2b
Format
mrousavy May 15, 2024
15552fd
Try to refactor everything away from static singletons....
mrousavy May 15, 2024
cac72f3
oh my god
mrousavy May 16, 2024
a16079f
fix: Fix decorators again
mrousavy May 16, 2024
6201411
fix: Fix ctx throwing
mrousavy May 16, 2024
f03a4d7
Update WKTJsiWorkletContext.h
mrousavy May 16, 2024
224887f
Update WKTJsiWorklet.h
mrousavy May 16, 2024
f042e4f
feat: Try to clean up createRunInContext
mrousavy May 16, 2024
ada3a53
feat: Rewrite the whole `createCallInContext` logic into `FunctionInv…
mrousavy May 16, 2024
30e3d79
fix: Implement createRunOnJS - stub out Promise
mrousavy May 16, 2024
6eebe9c
feat: Create `FunctionInvoker:: callAndForget`
mrousavy May 16, 2024
e179d2f
fix: Try to use simple Promise approach... fails
mrousavy May 16, 2024
6f022fc
Revert "fix: Try to use simple Promise approach... fails"
mrousavy May 16, 2024
6d224ee
Update types.ts
mrousavy May 16, 2024
f619ec4
Add Invoker again
mrousavy May 16, 2024
cb236d1
revert: Revert all changes that tried to remove the singleton pattern
mrousavy May 17, 2024
e00ecdb
feat: Initialize default instance so everything works again ✅
mrousavy May 17, 2024
6278404
fix: If a promise is resolved/rejected already, ensure we always have…
mrousavy May 17, 2024
0c3e69d
Merge branch 'main' into feat/cxxturbomodule
mrousavy May 17, 2024
25ce228
fix: Fix Android build
mrousavy May 17, 2024
e4cd40a
fix: Fix missing includes
mrousavy May 17, 2024
2b2bf73
Clang Format
mrousavy May 17, 2024
cf64156
Lint
mrousavy May 17, 2024
bffe8a2
Update action.yml
mrousavy May 17, 2024
26624fa
fix lint
mrousavy May 17, 2024
ed76d77
Update build-android.yml
mrousavy May 17, 2024
e4d75af
fix format
mrousavy May 17, 2024
ac52148
fix: Add the `react_codegen_RNWorkletsSpec` project with headers
mrousavy May 17, 2024
d8584b2
Revert "fix: Add the `react_codegen_RNWorkletsSpec` project with head…
mrousavy May 17, 2024
17ac6c2
Update ModuleNotFoundError.ts
mrousavy May 17, 2024
5b4c8c1
chore: release 2.0.0-beta.2
mrousavy May 17, 2024
b2fdab6
Update banner
mrousavy May 17, 2024
91d285d
fix: Don't build CMake ourselves - the consumer app will build it
mrousavy May 21, 2024
b919021
Remove `HERMES_ENABLE_DEBUGGER` (`hermes_executor`)
mrousavy May 21, 2024
9d7c207
fix: Update CI
mrousavy May 21, 2024
a046b9f
Update ModuleNotFoundError.ts
mrousavy May 21, 2024
5faaa18
Update docs
mrousavy May 21, 2024
e8ae864
chore: release 2.0.0-beta.3
mrousavy May 21, 2024
6a9807e
chore: pod install
hannojg Jun 3, 2024
f046ee8
chore: add json parse test (#204)
hannojg Jun 3, 2024
9c9c009
fix: Include RN config in npm
mrousavy Jun 3, 2024
0dd4971
chore: release 2.0.0-beta.4
mrousavy Jun 3, 2024
6e85b4b
add sample CxxTurboModule (iOS only for now)
hannojg Jun 5, 2024
88c5969
removed dev testing code
hannojg Jun 5, 2024
552186a
add test for native context creation
hannojg Jun 5, 2024
5cd8bf9
chore(example): fix typescript types
hannojg Jun 5, 2024
1d74be9
fix: Enable stricter header search paths for import at build time (`D…
hannojg Oct 16, 2024
2d3c8d6
upgrade example app to RN 0.75
hannojg Oct 16, 2024
2e0437e
ios upgrade RN
hannojg Oct 16, 2024
00dd8b9
wip android
hannojg Oct 16, 2024
6d99031
fix android build errors
hannojg Oct 16, 2024
98cc902
android call JNI code for installation
hannojg Oct 16, 2024
5ae82cf
android: inject WorkletsProxy into global
hannojg Oct 16, 2024
2ac4598
suppress error
hannojg Oct 16, 2024
b0c8500
improve error message
hannojg Oct 16, 2024
d9dd18f
fix(android): build errors old arch
hannojg Oct 16, 2024
e806bcd
iOS: new arch
hannojg Oct 16, 2024
4bec65e
ios: old arch
hannojg Oct 16, 2024
13579bc
pod install
hannojg Oct 16, 2024
b59d1e9
formatting
hannojg Oct 16, 2024
8eaf6a3
it was the lord
hannojg Oct 16, 2024
1fc5a19
restore previous cpp code from main
hannojg Oct 31, 2024
0a1d69d
remove double reference
hannojg Oct 31, 2024
fe3b4fa
run cleanup
hannojg Oct 31, 2024
5de68a9
chore(ci): fix eslint action
hannojg Oct 31, 2024
94ee22d
update snapshots
hannojg Oct 31, 2024
f164f57
Revert "update snapshots"
hannojg Oct 31, 2024
5f451f2
update snapshots
hannojg Oct 31, 2024
c697e21
clang format setup like vision camera
hannojg Oct 31, 2024
a04d562
format
hannojg Oct 31, 2024
59bd3d5
android: handle different js engines correctly
hannojg Oct 31, 2024
49c849d
update requirements
hannojg Oct 31, 2024
714f460
chore: fix ci
hannojg Oct 31, 2024
c38a47e
chore: fix ci
hannojg Oct 31, 2024
970cddf
chore: fix ci
hannojg Oct 31, 2024
0db0faa
chore: fix ci
hannojg Oct 31, 2024
c9f4734
chore: fix ci
hannojg Oct 31, 2024
a169615
wip: delete file
hannojg Oct 31, 2024
2cf5fa9
add file back
hannojg Oct 31, 2024
43c7742
wip
hannojg Oct 31, 2024
24dc5e3
wip: fix CI clang-format
hannojg Oct 31, 2024
0502628
wip: test breaking format
hannojg Oct 31, 2024
f77be16
Revert "wip: test breaking format"
hannojg Oct 31, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Config for clang-format version 18

# Standard
BasedOnStyle: llvm
Standard: c++14

# Indentation
IndentWidth: 2
ColumnLimit: 140

# Includes
SortIncludes: CaseSensitive
SortUsingDeclarations: true

# Pointer and reference alignment
PointerAlignment: Left
ReferenceAlignment: Left
ReflowComments: true

# Line breaking options
BreakBeforeBraces: Attach
BreakConstructorInitializers: BeforeColon
AlwaysBreakTemplateDeclarations: true
AllowShortFunctionsOnASingleLine: Empty
IndentCaseLabels: true
NamespaceIndentation: Inner
5 changes: 3 additions & 2 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@ name: Setup
description: Setup Node.js and install dependencies

runs:
defaults:
run:
working-directory: package
using: composite
steps:
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version-file: .nvmrc

- name: Cache dependencies
id: yarn-cache
Expand Down
37 changes: 21 additions & 16 deletions .github/workflows/build-android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,37 +6,42 @@ on:
- main
paths:
- '.github/workflows/build-android.yml'
- 'android/**'
- 'cpp/**'
- 'example/android/**'
- 'yarn.lock'
- 'example/yarn.lock'
- 'package/android/**'
- 'package/cpp/**'
- 'package/example/android/**'
- 'package/yarn.lock'
- 'package/example/yarn.lock'
pull_request:
paths:
- '.github/workflows/build-android.yml'
- 'android/**'
- 'cpp/**'
- 'example/android/**'
- 'yarn.lock'
- 'example/yarn.lock'
- 'package/android/**'
- 'package/cpp/**'
- 'package/example/android/**'
- 'package/yarn.lock'
- 'package/example/yarn.lock'

jobs:
build_example:
name: Build Android Example App
runs-on: ubuntu-latest
defaults:
run:
working-directory: package/
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Setup JDK 11
uses: actions/setup-java@v1
- name: Setup JDK 17
uses: actions/setup-java@v4
with:
java-version: 11
distribution: 'zulu'
java-version: 17
java-package: jdk

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Restore node_modules from cache
uses: actions/cache@v2
uses: actions/cache@v4
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
Expand All @@ -49,7 +54,7 @@ jobs:
run: yarn install --frozen-lockfile --cwd example

- name: Restore Gradle cache
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: |
~/.gradle/caches
Expand Down
38 changes: 19 additions & 19 deletions .github/workflows/build-ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,67 +6,67 @@ on:
- main
paths:
- '.github/workflows/build-ios.yml'
- 'ios/**'
- 'cpp/**'
- '*.podspec'
- 'example/ios/**'
- 'package/cpp/**'
- 'package/ios/**'
- 'package/*.podspec'
- 'package/example/ios/**'
pull_request:
paths:
- '.github/workflows/build-ios.yml'
- 'ios/**'
- 'cpp/**'
- '*.podspec'
- 'example/ios/**'
- 'package/cpp/**'
- 'package/ios/**'
- 'package/*.podspec'
- 'package/example/ios/**'

jobs:
build:
build_example:
name: Build iOS Example App
runs-on: macOS-latest
defaults:
run:
working-directory: example/ios
working-directory: package/example/ios
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Restore node_modules from cache
uses: actions/cache@v2
uses: actions/cache@v4
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install node_modules for root
- name: Install node_modules
run: yarn install --frozen-lockfile --cwd ../..
- name: Install node_modules for example/
run: yarn install --frozen-lockfile --cwd ..

- name: Restore buildcache
uses: mikehardy/buildcache-action@v1
uses: mikehardy/buildcache-action@v2
continue-on-error: true

- name: Setup Ruby (bundle)
uses: ruby/setup-ruby@v1
with:
ruby-version: '2.7.6'
ruby-version: 2.6
bundler-cache: true
working-directory: example
working-directory: package/example/ios

- name: Restore Pods cache
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: |
example/ios/Pods
package/example/ios/Pods
~/Library/Caches/CocoaPods
~/.cocoapods
key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }}
restore-keys: |
${{ runner.os }}-pods-
- name: Install Pods
run: bundle exec pod check || bundle exec pod install
run: yarn pods
- name: Install xcpretty
run: gem install xcpretty
- name: Build App
Expand Down
48 changes: 0 additions & 48 deletions .github/workflows/ci.yml

This file was deleted.

35 changes: 35 additions & 0 deletions .github/workflows/validate-cpp.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Validate C++

on:
push:
branches:
- main
paths:
- ".github/workflows/validate-cpp.yml"
- "package/cpp/**"
- "package/android/src/main/cpp/**"
- "package/ios/**"
pull_request:
paths:
- ".github/workflows/validate-cpp.yml"
- "package/cpp/**"
- "package/android/src/main/cpp/**"
- "package/ios/**"

jobs:
lint:
name: Check clang-format
runs-on: ubuntu-latest
strategy:
matrix:
path:
- "package/cpp"
- "package/android/src/main/cpp"
- "package/ios"
steps:
- uses: actions/checkout@v4
- name: Run clang-format style check
uses: DoozyX/clang-format-lint-action@v0.18.2
Comment thread
mrousavy marked this conversation as resolved.
with:
source: ${{ matrix.path }}
clangFormatVersion: 18.1.8
Loading