-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
temporary wasm package integration for CI and sandcastle until NPM
- Loading branch information
1 parent
b2f5aa2
commit 361312b
Showing
25 changed files
with
1,980 additions
and
15 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 |
---|---|---|
@@ -1,6 +1,7 @@ | ||
/node_modules | ||
/ThirdParty | ||
/Tools/** | ||
temp_wasm/* | ||
|
||
CHANGES.md | ||
LICENSE.md | ||
CHANGES.md | ||
LICENSE.md |
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
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
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,11 @@ | ||
install: | ||
- appveyor-retry appveyor DownloadFile https://win.rustup.rs/ -FileName rustup-init.exe | ||
- if not defined RUSTFLAGS rustup-init.exe -y --default-host x86_64-pc-windows-msvc --default-toolchain nightly | ||
- set PATH=%PATH%;C:\Users\appveyor\.cargo\bin | ||
- rustc -V | ||
- cargo -V | ||
|
||
build: false | ||
|
||
test_script: | ||
- cargo test --locked |
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,6 @@ | ||
/target | ||
**/*.rs.bk | ||
Cargo.lock | ||
bin/ | ||
pkg/ | ||
wasm-pack.log |
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,69 @@ | ||
language: rust | ||
sudo: false | ||
|
||
cache: cargo | ||
|
||
matrix: | ||
include: | ||
|
||
# Builds with wasm-pack. | ||
- rust: beta | ||
env: RUST_BACKTRACE=1 | ||
addons: | ||
firefox: latest | ||
chrome: stable | ||
before_script: | ||
- (test -x $HOME/.cargo/bin/cargo-install-update || cargo install cargo-update) | ||
- (test -x $HOME/.cargo/bin/cargo-generate || cargo install --vers "^0.2" cargo-generate) | ||
- cargo install-update -a | ||
- curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh -s -- -f | ||
script: | ||
- cargo generate --git . --name testing | ||
# Having a broken Cargo.toml (in that it has curlies in fields) anywhere | ||
# in any of our parent dirs is problematic. | ||
- mv Cargo.toml Cargo.toml.tmpl | ||
- cd testing | ||
- wasm-pack build | ||
- wasm-pack test --chrome --firefox --headless | ||
|
||
# Builds on nightly. | ||
- rust: nightly | ||
env: RUST_BACKTRACE=1 | ||
before_script: | ||
- (test -x $HOME/.cargo/bin/cargo-install-update || cargo install cargo-update) | ||
- (test -x $HOME/.cargo/bin/cargo-generate || cargo install --vers "^0.2" cargo-generate) | ||
- cargo install-update -a | ||
- rustup target add wasm32-unknown-unknown | ||
script: | ||
- cargo generate --git . --name testing | ||
- mv Cargo.toml Cargo.toml.tmpl | ||
- cd testing | ||
- cargo check | ||
- cargo check --target wasm32-unknown-unknown | ||
- cargo check --no-default-features | ||
- cargo check --target wasm32-unknown-unknown --no-default-features | ||
- cargo check --no-default-features --features console_error_panic_hook | ||
- cargo check --target wasm32-unknown-unknown --no-default-features --features console_error_panic_hook | ||
- cargo check --no-default-features --features "console_error_panic_hook wee_alloc" | ||
- cargo check --target wasm32-unknown-unknown --no-default-features --features "console_error_panic_hook wee_alloc" | ||
|
||
# Builds on beta. | ||
- rust: beta | ||
env: RUST_BACKTRACE=1 | ||
before_script: | ||
- (test -x $HOME/.cargo/bin/cargo-install-update || cargo install cargo-update) | ||
- (test -x $HOME/.cargo/bin/cargo-generate || cargo install --vers "^0.2" cargo-generate) | ||
- cargo install-update -a | ||
- rustup target add wasm32-unknown-unknown | ||
script: | ||
- cargo generate --git . --name testing | ||
- mv Cargo.toml Cargo.toml.tmpl | ||
- cd testing | ||
- cargo check | ||
- cargo check --target wasm32-unknown-unknown | ||
- cargo check --no-default-features | ||
- cargo check --target wasm32-unknown-unknown --no-default-features | ||
- cargo check --no-default-features --features console_error_panic_hook | ||
- cargo check --target wasm32-unknown-unknown --no-default-features --features console_error_panic_hook | ||
# Note: no enabling the `wee_alloc` feature here because it requires | ||
# nightly for now. |
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,32 @@ | ||
[package] | ||
name = "cesiumjs-gsplat-utils" | ||
version = "0.1.0" | ||
authors = ["Jason Sobotka <jason.sobotka@cesium.com>"] | ||
edition = "2021" | ||
|
||
|
||
[lib] | ||
crate-type = ["cdylib", "rlib"] | ||
|
||
[features] | ||
default = ["console_error_panic_hook"] | ||
|
||
[dependencies] | ||
wasm-bindgen = "0.2.84" | ||
js-sys = "0.3.72" | ||
web-sys = { version="0.3.72", features=["console"]} | ||
|
||
# The `console_error_panic_hook` crate provides better debugging of panics by | ||
# logging them with `console.error`. This is great for development, but requires | ||
# all the `std::fmt` and `std::panicking` infrastructure, so isn't great for | ||
# code size when deploying. | ||
console_error_panic_hook = { version = "0.1.7", optional = true } | ||
|
||
[dev-dependencies] | ||
wasm-bindgen-test = "0.3.34" | ||
|
||
[profile.release] | ||
# Tell `rustc` to optimize for small code size. | ||
opt-level = 3 | ||
lto = true | ||
codegen-units = 1 |
Oops, something went wrong.