Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
154 changes: 141 additions & 13 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ members = [
"sparse_strips/vello_hybrid",
"sparse_strips/vello_hybrid/examples/webgl",
"sparse_strips/vello_toy",
"sparse_strips/android_view_app",
]

[workspace.package]
Expand Down
9 changes: 9 additions & 0 deletions sparse_strips/android_view_app/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#
# https://help.github.com/articles/dealing-with-line-endings/
#
# Linux start script should use lf
/gradlew text eol=lf

# These are Windows script files and should use crlf
*.bat text eol=crlf

7 changes: 7 additions & 0 deletions sparse_strips/android_view_app/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Ignore Gradle project-specific cache directory
.gradle

# Ignore Gradle build output directory
build

/app/src/main/jniLibs
40 changes: 40 additions & 0 deletions sparse_strips/android_view_app/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
[package]
name = "sparse_strips_android"
publish = false
edition.workspace = true
license.workspace = true
repository.workspace = true

[lints]
workspace = true

[lib]
name = "main"
crate-type = ["cdylib"]

[dependencies]
accesskit = { git = "https://github.com/AccessKit/accesskit", branch = "android-extended-handlers" }
accesskit_android = { git = "https://github.com/AccessKit/accesskit", branch = "android-extended-handlers" }
android-view = { git = "https://github.com/DJMcNab/android-view.git", branch = "split-library" }
android_logger = "0.15.0"
anyhow = "1.0.96"
log = "0.4.26"
peniko = { version = "0.3.1", default-features = false }
pollster = "0.4.0"
vello_common = { workspace = true }
vello_hybrid = { workspace = true }
wgpu = { workspace = true }

# Send tracing events to Android GPU inspector, for profiling
tracing_android_trace = "0.1.1"
tracing-subscriber = "0.3.19"
# Make events recorded with profiling (e.g. in wgpu) visible to Android GPU inspector
profiling = { version = "1.0.16", features = ["profile-with-tracing"] }
# Make events recorded to `tracing` visible in logcat
tracing = { version = "0.1.38", features = ["log-always"] }

[profile.release]
panic = "abort"

[profile.dev]
panic = "abort"
19 changes: 19 additions & 0 deletions sparse_strips/android_view_app/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Demo of Android View with Vello Hybrid

[Android View](https://github.com/mwcampbell/android-view) is the upcoming new way to make Android apps with Rust.

To run this, you can use the following commands.

```sh
cd sparse_strips/android_view_app/
cargo ndk -t arm64-v8a -o app/src/main/jniLibs/ build -p sparse_strips_android [--release]
./gradlew build
./gradlew installDebug
```

You then should open the app "Vello Sparse Strips Demo".
To view logs and tracing output, run:

```sh
adb shell run-as org.linebender.vello.sparse_strips_demo logcat -v color
```
Loading
Loading