-
Notifications
You must be signed in to change notification settings - Fork 149
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
17 changed files
with
398 additions
and
277 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
name: Web Demo Update | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
release-web: | ||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: install stable toolchain | ||
uses: dtolnay/rust-toolchain@stable | ||
with: | ||
targets: wasm32-unknown-unknown | ||
|
||
- name: install wasm-bindgen | ||
uses: jetli/[email protected] | ||
with: | ||
version: 'latest' | ||
|
||
- name: build (wasm) | ||
run: cargo build -p with_winit --bin with_winit_bin --release --target wasm32-unknown-unknown | ||
env: | ||
RUSTFLAGS: '--cfg=web_sys_unstable_apis' | ||
|
||
- name: package wasm | ||
run: | | ||
mkdir public | ||
wasm-bindgen --target web --out-dir public target/wasm32-unknown-unknown/release/with_winit_bin.wasm --no-typescript | ||
cat << EOF > public/index.html | ||
<html> | ||
<title>Vello Web Demo</title> | ||
<meta content=no-cache http-equiv=Cache-control> | ||
<meta content=-1 http-equiv=Expires> | ||
<script type=module>import initSync from"/vello/with_winit_bin.js";initSync(`/vello/with_winit_bin_bg.wasm`);</script> | ||
<link as=fetch crossorigin href=/vello/with_winit_bin_bg.wasm rel=preload type=application/wasm> | ||
<link crossorigin href=/vello/with_winit_bin.js rel=modulepreload> | ||
</head> | ||
<body> | ||
<style> | ||
body { | ||
margin: 0; | ||
padding: 0; | ||
} | ||
</style> | ||
</body> | ||
</html> | ||
EOF | ||
- name: Setup Pages | ||
uses: actions/configure-pages@v4 | ||
|
||
- name: Upload artifact | ||
uses: actions/upload-pages-artifact@v3 | ||
with: | ||
path: './public' | ||
|
||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v4 |
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
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,5 @@ | ||
# Vello Encoding | ||
|
||
This package contains types that represent data that [Vello] can render. | ||
|
||
[Vello]: https://github.com/linebender/vello |
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,19 +1,17 @@ | ||
[package] | ||
name = "vello_tests" | ||
description = "Integration tests for Vello." | ||
edition.workspace = true | ||
version.workspace = true | ||
license.workspace = true | ||
repository.workspace = true | ||
publish = false | ||
|
||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | ||
|
||
[dependencies] | ||
vello = { path = "../.." } | ||
image = "0.24.5" | ||
image = "0.24.9" | ||
anyhow = { workspace = true } | ||
|
||
wgpu = { workspace = true } | ||
pollster = { workspace = true } | ||
png = "0.17.7" | ||
futures-intrusive = "0.5.0" | ||
png = "0.17.13" | ||
futures-intrusive = { workspace = true } |
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,23 +1,19 @@ | ||
[package] | ||
name = "headless" | ||
description = "An example showing how to use `vello` to create raster images" | ||
publish = false | ||
|
||
version.workspace = true | ||
license.workspace = true | ||
description = "An example showing how to use Vello to create raster images." | ||
edition.workspace = true | ||
license.workspace = true | ||
repository.workspace = true | ||
|
||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | ||
publish = false | ||
|
||
[dependencies] | ||
anyhow = { workspace = true } | ||
clap = { workspace = true, features = ["derive"] } | ||
vello = { path = "../../" } | ||
scenes = { path = "../scenes" } | ||
anyhow = { workspace = true } | ||
clap = { workspace = true, features = ["derive"] } | ||
|
||
wgpu = { workspace = true } | ||
pollster = { workspace = true } | ||
env_logger = "0.10.0" | ||
png = "0.17.7" | ||
futures-intrusive = "0.5.0" | ||
env_logger = "0.11.2" | ||
png = "0.17.13" | ||
futures-intrusive = { workspace = true } |
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,13 +1,9 @@ | ||
[package] | ||
name = "run_wasm" | ||
publish = false | ||
|
||
version.workspace = true | ||
license.workspace = true | ||
edition.workspace = true | ||
license.workspace = true | ||
repository.workspace = true | ||
|
||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | ||
publish = false | ||
|
||
[dependencies] | ||
cargo-run-wasm = "0.3.2" |
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,26 +1,22 @@ | ||
[package] | ||
name = "scenes" | ||
description = "Vello scenes used in the other examples" | ||
publish = false | ||
|
||
version.workspace = true | ||
license.workspace = true | ||
description = "Vello scenes used in the other examples." | ||
edition.workspace = true | ||
license.workspace = true | ||
repository.workspace = true | ||
|
||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | ||
publish = false | ||
|
||
[dependencies] | ||
vello = { path = "../../" } | ||
vello_svg = { path = "../../integrations/vello_svg" } | ||
anyhow = { workspace = true } | ||
clap = { workspace = true, features = ["derive"] } | ||
image = "0.24.5" | ||
image = "0.24.9" | ||
rand = "0.8.5" | ||
instant = { workspace = true } | ||
|
||
# Used for the `download` command | ||
[target.'cfg(not(target_arch = "wasm32"))'.dependencies] | ||
byte-unit = "4.0" | ||
dialoguer = "0.10" | ||
ureq = "2.6" | ||
ureq = "2.9" |
Oops, something went wrong.