Skip to content

Commit

Permalink
feat: Update Api, implement Rayon
Browse files Browse the repository at this point in the history
  • Loading branch information
28Smiles committed Jun 28, 2022
1 parent f503469 commit f3bd4ef
Show file tree
Hide file tree
Showing 46 changed files with 746 additions and 210 deletions.
21 changes: 20 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ jobs:
- js-test
strategy:
matrix:
package-type: [ "nodejs", "bundler", "web" ]
package-type: [ "nodejs", "bundler", "web", "web-parallel" ]
steps:
- uses: actions/checkout@v2
name: Clone
Expand Down Expand Up @@ -150,19 +150,33 @@ jobs:
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
- uses: actions-rs/toolchain@v1
name: Setup Rust
if: matrix.package-type != 'web-parallel'
with:
toolchain: nightly
override: true
- uses: actions-rs/toolchain@v1
name: Setup Rust
if: matrix.package-type == 'web-parallel'
with:
toolchain: nightly
override: true
components: rust-src
- uses: jetli/[email protected]
name: Install WasmPack
with:
version: 'latest'
- name: Install npm dependencies
run: yarn install
- name: Build Wasm
if: matrix.package-type != 'web-parallel'
run: |
wasm-pack build --target ${{ matrix.package-type }} -- --features wasm-pack --no-default-features
rm pkg/{package.json,README.md,.gitignore}
- name: Build Wasm
if: matrix.package-type == 'web-parallel'
run: |
RUSTFLAGS='-C target-feature=+atomics,+bulk-memory,+mutable-globals' wasm-pack build --target web -- --features wasm-pack,safe,wasm-parallel --no-default-features -Z build-std=panic_abort,std
rm pkg/{package.json,README.md,.gitignore}
- name: Build Ts
run: yarn run build:ts:${{ matrix.package-type }}
- name: Assemble
Expand Down Expand Up @@ -191,6 +205,10 @@ jobs:
with:
name: pkg-web
path: pkg.web
- uses: actions/download-artifact@master
with:
name: pkg-web-parallel
path: pkg.web-parallel
- uses: actions/upload-artifact@v2
name: Upload Artifacts
with:
Expand All @@ -199,6 +217,7 @@ jobs:
pkg.bundler/
pkg.nodejs/
pkg.web/
pkg.web-parallel/
package.json
index.browser.js
LICENCE
Expand Down
21 changes: 20 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ jobs:
- js-test
strategy:
matrix:
package-type: [ "nodejs", "bundler", "web" ]
package-type: [ "nodejs", "bundler", "web", "web-parallel" ]
steps:
- uses: actions/checkout@v2
name: Clone
Expand Down Expand Up @@ -153,19 +153,33 @@ jobs:
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
- uses: actions-rs/toolchain@v1
name: Setup Rust
if: matrix.package-type != 'web-parallel'
with:
toolchain: nightly
override: true
- uses: actions-rs/toolchain@v1
name: Setup Rust
if: matrix.package-type == 'web-parallel'
with:
toolchain: nightly
override: true
components: rust-src
- uses: jetli/[email protected]
name: Install WasmPack
with:
version: 'latest'
- name: Install npm dependencies
run: yarn install
- name: Build Wasm
if: matrix.package-type != 'web-parallel'
run: |
wasm-pack build --target ${{ matrix.package-type }} -- --features wasm-pack --no-default-features
rm pkg/{package.json,README.md,.gitignore}
- name: Build Wasm
if: matrix.package-type == 'web-parallel'
run: |
RUSTFLAGS='-C target-feature=+atomics,+bulk-memory,+mutable-globals' wasm-pack build --target web -- --features wasm-pack,safe,wasm-parallel --no-default-features -Z build-std=panic_abort,std
rm pkg/{package.json,README.md,.gitignore}
- name: Build Ts
run: yarn run build:ts:${{ matrix.package-type }}
- name: Assemble
Expand Down Expand Up @@ -194,6 +208,10 @@ jobs:
with:
name: pkg-web
path: pkg.web
- uses: actions/download-artifact@master
with:
name: pkg-web-parallel
path: pkg.web-parallel
- uses: actions/upload-artifact@v2
name: Upload Artifacts
with:
Expand All @@ -202,6 +220,7 @@ jobs:
pkg.bundler/
pkg.nodejs/
pkg.web/
pkg.web-parallel/
package.json
index.browser.js
LICENCE
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
/pkg.nodejs
/pkg.dist
/pkg.web
/pkg.web-parallel
/dist
/package
.pnp.*
Expand Down
Loading

0 comments on commit f3bd4ef

Please sign in to comment.