Skip to content

Commit

Permalink
chore: webgpu.2
Browse files Browse the repository at this point in the history
  • Loading branch information
triniwiz committed Aug 5, 2024
1 parent 753d691 commit c08e362
Show file tree
Hide file tree
Showing 280 changed files with 50,909 additions and 49,105 deletions.
18 changes: 12 additions & 6 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"root": true,
"ignorePatterns": ["**/*"],
"plugins": ["@nrwl/nx"],
"plugins": ["@nx"],
"overrides": [
{
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
"rules": {
"@nrwl/nx/enforce-module-boundaries": [
"@nx/enforce-module-boundaries": [
"error",
{
"enforceBuildableLibDependency": true,
Expand All @@ -23,13 +23,19 @@
},
{
"files": ["*.ts", "*.tsx"],
"extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended", "prettier", "plugin:@nrwl/nx/typescript"],
"rules": {}
"extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended", "prettier", "plugin:@nx/typescript"],
"rules": {
"@typescript-eslint/no-extra-semi": "error",
"no-extra-semi": "off"
}
},
{
"files": ["*.js", "*.jsx"],
"extends": ["plugin:@nrwl/nx/javascript"],
"rules": {}
"extends": ["plugin:@nx/javascript"],
"rules": {
"@typescript-eslint/no-extra-semi": "error",
"no-extra-semi": "off"
}
},
{
"files": ["references.d.ts"],
Expand Down
60 changes: 60 additions & 0 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Canvas Native

on:
push:
branches:
- main
pull_request:
workflow_dispatch:

env:
CARGO_TERM_COLOR: always

env:
NPM_TAG: "pr"
EMULATOR_NAME: "runtime-emu"
NDK_VERSION: r23c
ANDROID_API: 29
ANDROID_ABI: x86_64
NDK_ARCH: linux


jobs:
build:
name: Build
runs-on: ubuntu-22.04
outputs:
npm_version: ${{ steps.npm_version_output.outputs.NPM_VERSION }}
npm_tag: ${{ steps.npm_version_output.outputs.NPM_TAG }}
steps:
- name: Install rust
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
- uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: true
- uses: actions/setup-node@v3
with:
node-version: 20
registry-url: "https://registry.npmjs.org"
- uses: actions/setup-java@v3
with:
distribution: "temurin"
java-version: "17"
cache: gradle
- name: Setup Android SDK
uses: android-actions/setup-android@v2
- name: Setup NDK
run: |
echo "y" | sdkmanager "cmake;3.6.4111459"
wget https://dl.google.com/android/repository/android-ndk-$NDK_VERSION-$NDK_ARCH.zip
chmod +x android-ndk-$NDK_VERSION-$NDK_ARCH.zip
unzip -q android-ndk-$NDK_VERSION-$NDK_ARCH.zip
rm -rf android-ndk-$NDK_VERSION-$NDK_ARCH.zip
export ANDROID_NDK_HOME=`pwd`/android-ndk-$NDK_VERSION
echo ANDROID_NDK_HOME=${ANDROID_NDK_HOME} >> $GITHUB_ENV
echo ANDROID_NDK=${ANDROID_NDK_HOME} >> $GITHUB_ENV
echo ${ANDROID_NDK_HOME} >> $GITHUB_PATH
15 changes: 0 additions & 15 deletions .github/workflows/rust.yml

This file was deleted.

3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,6 @@ rust-skia
/target
/**/*.rs.bk
/Cargo.lock

.nx/cache
.nx/workspace-data
3 changes: 3 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,6 @@
/dist
/coverage
native-src

/.nx/cache
/.nx/workspace-data
4 changes: 2 additions & 2 deletions CanvasNative.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Pod::Spec.new do |s|

s.name = "CanvasNative"

s.version = "1.0.0"
s.version = "2.0.0"

s.summary = "A Canvas library"

Expand All @@ -19,7 +19,7 @@ Pod::Spec.new do |s|

s.pod_target_xcconfig = {
'FRAMEWORK_SEARCH_PATHS' => '$(inherited) "${PODS_ROOT}/dist"',
'ENABLE_BITCODE' => 'YES'
'ENABLE_BITCODE' => 'NO'
}
s.swift_versions = ['4.0','4.2', '5.0']
s.vendored_frameworks = 'packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework'
Expand Down
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,6 @@ canvas-core = { path = "./crates/canvas-core" }
canvas-webgl = { path = "./crates/canvas-webgl" }
gl-bindings = { path = "./crates/gl-bindings" }
canvas-c = { path = "./crates/canvas-c" }
skia-safe = { version = "0.75.0", features = ["textlayout"] }
skia-safe = { version = "0.73.0", features = ["textlayout"] }
itertools = "0.13.0"
wgpu-core = { version = "22.0.0", features = ["wgsl", "raw-window-handle"] }
wgpu-core = { version = "22.1.0", features = ["wgsl", "vulkan", "metal", "raw-window-handle"] }
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ GENERATE_HEADERS:
# PHONY keyword on make means this is not a file, just an identifier for a target
.PHONY: $(ARCHS_IOS)
$(ARCHS_IOS): %:
cargo +nightly build -Z build-std='std,panic_abort' -Z build-std-features=panic_immediate_abort --target $@ --release -p canvas-ios
RUSTFLAGS="-Zlocation-detail=none -C panic=abort" cargo +nightly build -Z build-std='std,panic_abort' -Z build-std-features=panic_immediate_abort --target $@ --release -p canvas-svg

$(XCFRAMEWORK): $(ARCHS_IOS)

Expand Down
38 changes: 19 additions & 19 deletions apps/demo-angular/package.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
{
"main": "./src/main.ts",
"dependencies": {
"@nativescript/canvas": "file:../../dist/packages/canvas",
"@nativescript/canvas-babylon": "file:../../dist/packages/canvas-babylon",
"@nativescript/canvas-media": "file:../../dist/packages/canvas-media",
"@nativescript/canvas-phaser": "file:../../dist/packages/canvas-phaser",
"@nativescript/canvas-phaser-ce": "file:../../dist/packages/canvas-phaser-ce",
"@nativescript/canvas-pixi": "file:../../dist/packages/canvas-pixi",
"@nativescript/canvas-polyfill": "file:../../dist/packages/canvas-polyfill",
"@nativescript/canvas-three": "file:../../dist/packages/canvas-three",
"@nativescript/core": "file:../../node_modules/@nativescript/core",
"three": "file:../../node_modules/three",
"@nativescript/canvas-chartjs": "file:../../dist/packages/canvas-chartjs",
"@nativescript/canvas-svg": "file:../../dist/packages/canvas-svg"
},
"devDependencies": {
"@nativescript/android": "~8.5.0",
"@nativescript/ios": "8.5.1-dev.0"
}
"main": "./src/main.ts",
"dependencies": {
"@nativescript/canvas": "file:../../dist/packages/canvas",
"@nativescript/canvas-babylon": "file:../../dist/packages/canvas-babylon",
"@nativescript/canvas-media": "file:../../dist/packages/canvas-media",
"@nativescript/canvas-phaser": "file:../../dist/packages/canvas-phaser",
"@nativescript/canvas-phaser-ce": "file:../../dist/packages/canvas-phaser-ce",
"@nativescript/canvas-pixi": "file:../../dist/packages/canvas-pixi",
"@nativescript/canvas-polyfill": "file:../../dist/packages/canvas-polyfill",
"@nativescript/canvas-three": "file:../../dist/packages/canvas-three",
"@nativescript/core": "file:../../node_modules/@nativescript/core",
"three": "file:../../node_modules/three",
"@nativescript/canvas-chartjs": "file:../../dist/packages/canvas-chartjs",
"@nativescript/canvas-svg": "file:../../dist/packages/canvas-svg"
},
"devDependencies": {
"@nativescript/android": "~8.7.0",
"@nativescript/ios": "~8.7.0"
}
}
11 changes: 4 additions & 7 deletions apps/demo-angular/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"dependsOn": [
{
"target": "build.all",
"projects": "dependencies"
"dependencies": true
}
]
},
Expand All @@ -30,7 +30,7 @@
"dependsOn": [
{
"target": "build.all",
"projects": "dependencies"
"dependencies": true
}
]
},
Expand All @@ -43,7 +43,7 @@
"dependsOn": [
{
"target": "build.all",
"projects": "dependencies"
"dependencies": true
}
]
},
Expand All @@ -54,10 +54,7 @@
}
},
"lint": {
"executor": "@nrwl/linter:eslint",
"options": {
"lintFilePatterns": ["apps/demo-angular/**/*.ts"]
}
"executor": "@nx/eslint:lint"
}
}
}
14 changes: 8 additions & 6 deletions apps/demo-vue/app/package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
{
"main": "app.js",
"android": {
"v8Flags": "--expose_gc",
"requireModules": ["@nativescript/imagepicker"],
"markingMode": "none"
}
"main": "app.js",
"android": {
"v8Flags": "--expose_gc",
"requireModules": [
"@nativescript/imagepicker"
],
"markingMode": "none"
}
}
38 changes: 19 additions & 19 deletions apps/demo-vue/package.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
{
"main": "./app/app.ts",
"dependencies": {
"nativescript-vue": "file:../../node_modules/nativescript-vue",
"@nativescript/core": "file:../../node_modules/@nativescript/core",
"@nativescript/canvas-media": "file:../../packages/canvas-media",
"@nativescript/canvas": "file:../../packages/canvas",
"@nativescript/canvas-babylon": "file:../../packages/canvas-babylon",
"@nativescript/canvas-phaser": "file:../../packages/canvas-phaser",
"@nativescript/canvas-phaser-ce": "file:../../packages/canvas-phaser-ce",
"@nativescript/canvas-pixi": "file:../../packages/canvas-pixi",
"@nativescript/canvas-polyfill": "file:../../packages/canvas-polyfill",
"@nativescript/canvas-three": "file:../../packages/canvas-three",
"@nativescript/canvas-chartjs": "file:../../packages/canvas-chartjs",
"@nativescript/canvas-svg": "file:../../packages/canvas-svg"
},
"devDependencies": {
"@nativescript/android": "~8.5.0",
"@nativescript/ios": "8.5.1-dev.0"
}
"main": "./app/app.ts",
"dependencies": {
"nativescript-vue": "file:../../node_modules/nativescript-vue",
"@nativescript/core": "file:../../node_modules/@nativescript/core",
"@nativescript/canvas-media": "file:../../packages/canvas-media",
"@nativescript/canvas": "file:../../packages/canvas",
"@nativescript/canvas-babylon": "file:../../packages/canvas-babylon",
"@nativescript/canvas-phaser": "file:../../packages/canvas-phaser",
"@nativescript/canvas-phaser-ce": "file:../../packages/canvas-phaser-ce",
"@nativescript/canvas-pixi": "file:../../packages/canvas-pixi",
"@nativescript/canvas-polyfill": "file:../../packages/canvas-polyfill",
"@nativescript/canvas-three": "file:../../packages/canvas-three",
"@nativescript/canvas-chartjs": "file:../../packages/canvas-chartjs",
"@nativescript/canvas-svg": "file:../../packages/canvas-svg"
},
"devDependencies": {
"@nativescript/android": "~8.7.0",
"@nativescript/ios": "~8.7.0"
}
}
11 changes: 4 additions & 7 deletions apps/demo-vue/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"dependsOn": [
{
"target": "build.all",
"projects": "dependencies"
"dependencies": true
}
]
},
Expand All @@ -29,7 +29,7 @@
"dependsOn": [
{
"target": "build.all",
"projects": "dependencies"
"dependencies": true
}
]
},
Expand All @@ -41,7 +41,7 @@
"dependsOn": [
{
"target": "build.all",
"projects": "dependencies"
"dependencies": true
}
]
},
Expand All @@ -52,10 +52,7 @@
}
},
"lint": {
"executor": "@nrwl/linter:eslint",
"options": {
"lintFilePatterns": ["apps/demo-vue/**/*.ts"]
}
"executor": "@nx/eslint:lint"
}
}
}
Loading

0 comments on commit c08e362

Please sign in to comment.