or-tools-wasm 0.7.0 → 0.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +47 -13
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -10,6 +10,19 @@ Used in [PragmaPlanner.com](https://pragmaplanner.com/?utm_source=or-tools-wasm&
10
10
  [GitHub](https://github.com/Axelwickm/or-tools-wasm)
11
11
  [npm](https://www.npmjs.com/package/or-tools-wasm)
12
12
 
13
+ [![Package](https://github.com/Axelwickm/or-tools-wasm/actions/workflows/package.yml/badge.svg)](https://github.com/Axelwickm/or-tools-wasm/actions/workflows/package.yml)
14
+ [![Vite 7 dev Chromium](https://img.shields.io/github/check-runs/Axelwickm/or-tools-wasm/stable?label=Vite%207%20dev%20Chromium&nameFilter=Vite%207%20%2F%20dev%20%2F%20chromium)](https://github.com/Axelwickm/or-tools-wasm/actions/workflows/package.yml)
15
+ [![Vite 7 dev Firefox](https://img.shields.io/github/check-runs/Axelwickm/or-tools-wasm/stable?label=Vite%207%20dev%20Firefox&nameFilter=Vite%207%20%2F%20dev%20%2F%20firefox)](https://github.com/Axelwickm/or-tools-wasm/actions/workflows/package.yml)
16
+ [![Vite 7 static Chromium](https://img.shields.io/github/check-runs/Axelwickm/or-tools-wasm/stable?label=Vite%207%20static%20Chromium&nameFilter=Vite%207%20%2F%20static%20%2F%20chromium)](https://github.com/Axelwickm/or-tools-wasm/actions/workflows/package.yml)
17
+ [![Vite 7 static Firefox](https://img.shields.io/github/check-runs/Axelwickm/or-tools-wasm/stable?label=Vite%207%20static%20Firefox&nameFilter=Vite%207%20%2F%20static%20%2F%20firefox)](https://github.com/Axelwickm/or-tools-wasm/actions/workflows/package.yml)
18
+ [![Webpack 5 dev Chromium](https://img.shields.io/github/check-runs/Axelwickm/or-tools-wasm/stable?label=Webpack%205%20dev%20Chromium&nameFilter=Webpack%205%20%2F%20dev%20%2F%20chromium)](https://github.com/Axelwickm/or-tools-wasm/actions/workflows/package.yml)
19
+ [![Webpack 5 dev Firefox](https://img.shields.io/github/check-runs/Axelwickm/or-tools-wasm/stable?label=Webpack%205%20dev%20Firefox&nameFilter=Webpack%205%20%2F%20dev%20%2F%20firefox)](https://github.com/Axelwickm/or-tools-wasm/actions/workflows/package.yml)
20
+ [![Webpack 5 static Chromium](https://img.shields.io/github/check-runs/Axelwickm/or-tools-wasm/stable?label=Webpack%205%20static%20Chromium&nameFilter=Webpack%205%20%2F%20static%20%2F%20chromium)](https://github.com/Axelwickm/or-tools-wasm/actions/workflows/package.yml)
21
+ [![Webpack 5 static Firefox](https://img.shields.io/github/check-runs/Axelwickm/or-tools-wasm/stable?label=Webpack%205%20static%20Firefox&nameFilter=Webpack%205%20%2F%20static%20%2F%20firefox)](https://github.com/Axelwickm/or-tools-wasm/actions/workflows/package.yml)
22
+ [![Rollup 4 static Chromium](https://img.shields.io/github/check-runs/Axelwickm/or-tools-wasm/stable?label=Rollup%204%20static%20Chromium&nameFilter=Rollup%204%20%2F%20static%20%2F%20chromium)](https://github.com/Axelwickm/or-tools-wasm/actions/workflows/package.yml)
23
+ [![Rollup 4 static Firefox](https://img.shields.io/github/check-runs/Axelwickm/or-tools-wasm/stable?label=Rollup%204%20static%20Firefox&nameFilter=Rollup%204%20%2F%20static%20%2F%20firefox)](https://github.com/Axelwickm/or-tools-wasm/actions/workflows/package.yml)
24
+ [![Deno](https://img.shields.io/github/check-runs/Axelwickm/or-tools-wasm/stable?label=Deno&nameFilter=Deno%20%2F%20solve)](https://github.com/Axelwickm/or-tools-wasm/actions/workflows/package.yml)
25
+
13
26
  ## Install
14
27
 
15
28
  ```sh
@@ -20,19 +33,6 @@ npm install or-tools-wasm
20
33
  import { CpSat } from 'or-tools-wasm';
21
34
  ```
22
35
 
23
- [![Package](https://github.com/Axelwickm/or-tools-wasm/actions/workflows/package.yml/badge.svg)](https://github.com/Axelwickm/or-tools-wasm/actions/workflows/package.yml)
24
- [![Vite 7 dev Chromium](https://img.shields.io/github/checks-status/Axelwickm/or-tools-wasm/stable?label=Vite%207%20dev%20Chromium&name=Vite%207%20%2F%20dev%20%2F%20chromium)](https://github.com/Axelwickm/or-tools-wasm/actions/workflows/package.yml)
25
- [![Vite 7 dev Firefox](https://img.shields.io/github/checks-status/Axelwickm/or-tools-wasm/stable?label=Vite%207%20dev%20Firefox&name=Vite%207%20%2F%20dev%20%2F%20firefox)](https://github.com/Axelwickm/or-tools-wasm/actions/workflows/package.yml)
26
- [![Vite 7 static Chromium](https://img.shields.io/github/checks-status/Axelwickm/or-tools-wasm/stable?label=Vite%207%20static%20Chromium&name=Vite%207%20%2F%20static%20%2F%20chromium)](https://github.com/Axelwickm/or-tools-wasm/actions/workflows/package.yml)
27
- [![Vite 7 static Firefox](https://img.shields.io/github/checks-status/Axelwickm/or-tools-wasm/stable?label=Vite%207%20static%20Firefox&name=Vite%207%20%2F%20static%20%2F%20firefox)](https://github.com/Axelwickm/or-tools-wasm/actions/workflows/package.yml)
28
- [![Webpack 5 dev Chromium](https://img.shields.io/github/checks-status/Axelwickm/or-tools-wasm/stable?label=Webpack%205%20dev%20Chromium&name=Webpack%205%20%2F%20dev%20%2F%20chromium)](https://github.com/Axelwickm/or-tools-wasm/actions/workflows/package.yml)
29
- [![Webpack 5 dev Firefox](https://img.shields.io/github/checks-status/Axelwickm/or-tools-wasm/stable?label=Webpack%205%20dev%20Firefox&name=Webpack%205%20%2F%20dev%20%2F%20firefox)](https://github.com/Axelwickm/or-tools-wasm/actions/workflows/package.yml)
30
- [![Webpack 5 static Chromium](https://img.shields.io/github/checks-status/Axelwickm/or-tools-wasm/stable?label=Webpack%205%20static%20Chromium&name=Webpack%205%20%2F%20static%20%2F%20chromium)](https://github.com/Axelwickm/or-tools-wasm/actions/workflows/package.yml)
31
- [![Webpack 5 static Firefox](https://img.shields.io/github/checks-status/Axelwickm/or-tools-wasm/stable?label=Webpack%205%20static%20Firefox&name=Webpack%205%20%2F%20static%20%2F%20firefox)](https://github.com/Axelwickm/or-tools-wasm/actions/workflows/package.yml)
32
- [![Rollup 4 static Chromium](https://img.shields.io/github/checks-status/Axelwickm/or-tools-wasm/stable?label=Rollup%204%20static%20Chromium&name=Rollup%204%20%2F%20static%20%2F%20chromium)](https://github.com/Axelwickm/or-tools-wasm/actions/workflows/package.yml)
33
- [![Rollup 4 static Firefox](https://img.shields.io/github/checks-status/Axelwickm/or-tools-wasm/stable?label=Rollup%204%20static%20Firefox&name=Rollup%204%20%2F%20static%20%2F%20firefox)](https://github.com/Axelwickm/or-tools-wasm/actions/workflows/package.yml)
34
- [![Deno](https://img.shields.io/github/checks-status/Axelwickm/or-tools-wasm/stable?label=Deno&name=Deno%20%2F%20solve)](https://github.com/Axelwickm/or-tools-wasm/actions/workflows/package.yml)
35
-
36
36
  Currently supported solvers: CP-SAT.
37
37
 
38
38
  Verified with:
@@ -155,6 +155,40 @@ export default defineConfig({
155
155
  });
156
156
  ```
157
157
 
158
+ ### Webpack
159
+
160
+ For Webpack 5, enable async WebAssembly, emit `.wasm` files as resources, and
161
+ use `publicPath: 'auto'` so worker and WebAssembly URLs resolve from the emitted
162
+ bundle location:
163
+
164
+ ```js
165
+ // webpack.config.cjs
166
+ const headers = {
167
+ 'Cross-Origin-Opener-Policy': 'same-origin',
168
+ 'Cross-Origin-Embedder-Policy': 'require-corp',
169
+ };
170
+
171
+ module.exports = {
172
+ output: {
173
+ publicPath: 'auto',
174
+ },
175
+ experiments: {
176
+ asyncWebAssembly: true,
177
+ },
178
+ module: {
179
+ rules: [
180
+ {
181
+ test: /\.wasm$/,
182
+ type: 'asset/resource',
183
+ },
184
+ ],
185
+ },
186
+ devServer: {
187
+ headers,
188
+ },
189
+ };
190
+ ```
191
+
158
192
  ### Rollup
159
193
 
160
194
  Rollup core does not bundle module workers or emit `new URL(...,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "or-tools-wasm",
3
3
  "private": false,
4
- "version": "0.7.0",
4
+ "version": "0.7.1",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
7
7
  "type": "git",