Skip to content

Commit 25904a0

Browse files
committed
first commit
0 parents  commit 25904a0

45 files changed

Lines changed: 3194 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.eslintrc.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
module.exports = {
2+
root: true,
3+
extends: ['@react-native'],
4+
parser: '@typescript-eslint/parser',
5+
plugins: ['@typescript-eslint'],
6+
overrides: [
7+
{
8+
files: ['*.ts', '*.tsx'],
9+
rules: {
10+
'@typescript-eslint/no-shadow': ['error'],
11+
'no-shadow': 'off',
12+
'no-undef': 'off',
13+
},
14+
},
15+
],
16+
};

.github/workflows/ci.yml

Lines changed: 129 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,129 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ main, develop ]
6+
pull_request:
7+
branches: [ main, develop ]
8+
9+
jobs:
10+
test-typescript:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- name: Setup Node.js
17+
uses: actions/setup-node@v4
18+
with:
19+
node-version: '18'
20+
cache: 'yarn'
21+
22+
- name: Install dependencies
23+
run: yarn install --frozen-lockfile
24+
25+
- name: Lint TypeScript
26+
run: yarn lint
27+
28+
- name: Build TypeScript
29+
run: yarn build
30+
31+
- name: Run TypeScript tests
32+
run: yarn test
33+
34+
test-rust:
35+
runs-on: ubuntu-latest
36+
37+
steps:
38+
- uses: actions/checkout@v4
39+
40+
- name: Setup Rust
41+
uses: dtolnay/rust-toolchain@stable
42+
with:
43+
components: rustfmt, clippy
44+
45+
- name: Cache Rust dependencies
46+
uses: Swatinem/rust-cache@v2
47+
with:
48+
workspaces: rust
49+
50+
- name: Check Rust formatting
51+
run: cd rust && cargo fmt --check
52+
53+
- name: Lint Rust code
54+
run: cd rust && cargo clippy -- -D warnings
55+
56+
- name: Run Rust tests
57+
run: cd rust && cargo test
58+
59+
- name: Test TypeScript type generation
60+
run: cd rust && cargo run --bin generate-types --features ts-rs
61+
62+
build-ios:
63+
runs-on: macos-latest
64+
65+
steps:
66+
- uses: actions/checkout@v4
67+
68+
- name: Setup Rust
69+
uses: dtolnay/rust-toolchain@stable
70+
with:
71+
targets: aarch64-apple-ios,aarch64-apple-ios-sim,x86_64-apple-ios
72+
73+
- name: Cache Rust dependencies
74+
uses: Swatinem/rust-cache@v2
75+
with:
76+
workspaces: rust
77+
78+
- name: Build iOS libraries
79+
run: |
80+
cd rust
81+
bash install-prerequisites.sh
82+
EAS_BUILD_PLATFORM=ios bash build.sh
83+
84+
build-android:
85+
runs-on: ubuntu-latest
86+
87+
steps:
88+
- uses: actions/checkout@v4
89+
90+
- name: Setup Rust
91+
uses: dtolnay/rust-toolchain@stable
92+
with:
93+
targets: aarch64-linux-android,x86_64-linux-android
94+
95+
- name: Setup Android NDK
96+
uses: nttld/setup-ndk@v1
97+
with:
98+
ndk-version: r25c
99+
100+
- name: Cache Rust dependencies
101+
uses: Swatinem/rust-cache@v2
102+
with:
103+
workspaces: rust
104+
105+
- name: Install cargo-ndk
106+
run: cargo install cargo-ndk
107+
108+
- name: Build Android libraries
109+
run: |
110+
cd rust
111+
export ANDROID_HOME=$ANDROID_SDK_ROOT
112+
EAS_BUILD_PLATFORM=android bash build.sh
113+
114+
check-types:
115+
runs-on: ubuntu-latest
116+
117+
steps:
118+
- uses: actions/checkout@v4
119+
120+
- name: Setup Rust
121+
uses: dtolnay/rust-toolchain@stable
122+
123+
- name: Cache Rust dependencies
124+
uses: Swatinem/rust-cache@v2
125+
with:
126+
workspaces: rust
127+
128+
- name: Check TypeScript types are up to date
129+
run: yarn check-types

.gitignore

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
# Dependencies
2+
node_modules/
3+
yarn.lock
4+
5+
# Build outputs
6+
lib/
7+
dist/
8+
build/
9+
10+
# Rust
11+
rust/target/
12+
rust/Cargo.lock
13+
*.xcframework/
14+
15+
# Native builds
16+
android/build/
17+
android/.cxx/
18+
ios/build/
19+
cpp/target/
20+
21+
# IDE
22+
.vscode/
23+
.idea/
24+
*.swp
25+
*.swo
26+
27+
# OS
28+
.DS_Store
29+
Thumbs.db
30+
31+
# Logs
32+
*.log
33+
npm-debug.log*
34+
yarn-debug.log*
35+
yarn-error.log*
36+
37+
# Runtime data
38+
pids
39+
*.pid
40+
*.seed
41+
*.pid.lock
42+
43+
# Coverage directory used by tools like istanbul
44+
coverage/
45+
46+
# nyc test coverage
47+
.nyc_output
48+
49+
# Dependency directories
50+
jspm_packages/
51+
52+
# Optional npm cache directory
53+
.npm
54+
55+
# Optional REPL history
56+
.node_repl_history
57+
58+
# Output of 'npm pack'
59+
*.tgz
60+
61+
# Yarn Integrity file
62+
.yarn-integrity
63+
64+
# dotenv environment variables file
65+
.env
66+
.env.test
67+
68+
# parcel-bundler cache (https://parceljs.org/)
69+
.cache
70+
.parcel-cache
71+
72+
# next.js build output
73+
.next
74+
75+
# nuxt.js build output
76+
.nuxt
77+
78+
# vuepress build output
79+
.vuepress/dist
80+
81+
# Serverless directories
82+
.serverless
83+
84+
# FuseBox cache
85+
.fusebox/
86+
87+
# DynamoDB Local files
88+
.dynamodb/

.npmignore

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# Source files
2+
src/
3+
rust/src/
4+
rust/target/
5+
rust/Cargo.lock
6+
7+
# Development files
8+
example/
9+
.github/
10+
.vscode/
11+
.idea/
12+
13+
# Build scripts (users should build themselves)
14+
rust/build.sh
15+
rust/install-prerequisites.sh
16+
17+
# Documentation (except README)
18+
CONTRIBUTING.md
19+
docs/
20+
21+
# Test files
22+
**/*.test.*
23+
**/__tests__/
24+
jest.config.js
25+
jest.setup.js
26+
27+
# Linting
28+
.eslintrc.js
29+
.prettierrc
30+
31+
# Git
32+
.git/
33+
.gitignore
34+
35+
# OS
36+
.DS_Store
37+
Thumbs.db
38+
39+
# Logs
40+
*.log
41+
42+
# Dependencies
43+
node_modules/
44+
45+
# IDE
46+
*.swp
47+
*.swo

0 commit comments

Comments
 (0)