-
-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
190 changed files
with
21,107 additions
and
7,327 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,51 @@ | ||
ARCHS_IOS = x86_64-apple-ios aarch64-apple-ios aarch64-apple-ios-sim | ||
ARCHS_ANDROID = i686-linux-android x86_64-linux-android aarch64-linux-android armv7-linux-androideabi | ||
# LIB = libcanvasative.dylib | ||
XCFRAMEWORK = CanvasNative.xcframework | ||
RUST_LIB = canvasnative | ||
|
||
all:GENERATE_HEADERS ios android | ||
|
||
ios: $(XCFRAMEWORK) | ||
|
||
android: GENERATE_ANDROID | ||
|
||
android_svg: GENERATE_ANDROID_SVG | ||
|
||
ios_svg: GENERATE_IOS_SVG | ||
|
||
.PHONY: GENERATE_HEADERS | ||
GENERATE_HEADERS: | ||
./tools/scripts/build-headers.sh | ||
|
||
# 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 | ||
|
||
$(XCFRAMEWORK): $(ARCHS_IOS) | ||
|
||
.PHONY: $(ARCHS_ANDROID) | ||
$(ARCHS_ANDROID): %: | ||
./tools/scripts/build-android.sh $@ && ./tools/scripts/copy-android.sh $@ | ||
|
||
.PHONY: GENERATE_ANDROID | ||
GENERATE_ANDROID: $(ARCHS_ANDROID) | ||
|
||
# .PHONY: $(ARCHS_IOS)_SVG | ||
# $(ARCHS_IOS)_SVG: %_svg: | ||
# ./tools/scripts/build-svg-ios.sh $* && ./tools/scripts/copy-svg-ios.sh $* | ||
|
||
# .PHONY: GENERATE_IOS_SVG | ||
# GENERATE_IOS_SVG: $(addsuffix _svg,$(ARCHS_IOS)) | ||
|
||
# .PHONY: $(ARCHS_ANDROID)_SVG | ||
# $(ARCHS_ANDROID)_SVG: %_svg: | ||
# ./tools/scripts/build-svg-android.sh $* && ./tools/scripts/copy-svg-android.sh $* | ||
|
||
# .PHONY: GENERATE_ANDROID_SVG | ||
# GENERATE_ANDROID_SVG: $(addsuffix _svg,$(ARCHS_ANDROID)) | ||
|
||
.PHONY: clean | ||
clean: | ||
rm -rf target |
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 |
---|---|---|
@@ -1 +1 @@ | ||
/// <reference path="../../references.d.ts" /> | ||
/// <reference path="../../references.d.ts" /> |
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,28 @@ | ||
[package] | ||
name = "canvas-c" | ||
version = "0.1.0" | ||
edition = "2021" | ||
|
||
[features] | ||
2d = ["dep:canvas-2d"] | ||
webgl = ["dep:canvas-webgl"] | ||
|
||
[dependencies] | ||
gl-bindings = { path = "../gl-bindings" } | ||
canvas-core = { path = "../canvas-core", features = ["2d"] } | ||
canvas-2d = { path = "../canvas-2d", optional = true, features = ["gl"] } | ||
canvas-webgl = { path = "../canvas-webgl", optional = true } | ||
parking_lot = "0.12.0" | ||
ureq = { version = "2.9.6", features = ["gzip"] } | ||
bytes = "1.5.0" | ||
log = { version = "0.4.20"} | ||
wgpu = "0.20.1" | ||
futures = "0.3" | ||
|
||
[target.'cfg(target_vendor="apple")'.dependencies] | ||
display-link = "0.2.0" | ||
|
||
|
||
[target.'cfg(target_os="android")'.dependencies] | ||
ndk = { version = "0.7.0", features = ["bitmap"] } | ||
once_cell = "1.14.0" |
Oops, something went wrong.