Commit 644e97b
authored
Support build configurations without Intl API (#623)
* Support build configurations without Intl API
The Intl API requires bundling a very large amount of data, and isn't needed in absolutely all environments.
This commit introduces an `intl` feature, which is enabled by default on `mozjs`, and builds SpiderMonkey without Intl support if that feature is disabled.
On MacOS, a mozjs embedding I'm working on shrinks from 32MB to 12MB, and a wasm32 build from also 32MB to 8.5MB (all stripped).
Signed-off-by: Till Schneidereit <[email protected]>
* Always build from source if intl feature is disabled
Signed-off-by: Till Schneidereit <[email protected]>
* Bump `mozjs-sys` version
Signed-off-by: Till Schneidereit <[email protected]>
---------
Signed-off-by: Till Schneidereit <[email protected]>1 parent f5d9a37 commit 644e97b
File tree
5 files changed
+19
-5
lines changed- mozjs-sys
- src
- mozjs
5 files changed
+19
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
29 | 30 | | |
30 | 31 | | |
31 | 32 | | |
| |||
35 | 36 | | |
36 | 37 | | |
37 | 38 | | |
38 | | - | |
| 39 | + | |
39 | 40 | | |
40 | 41 | | |
41 | 42 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
224 | 224 | | |
225 | 225 | | |
226 | 226 | | |
227 | | - | |
228 | 227 | | |
229 | | - | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
230 | 234 | | |
231 | 235 | | |
232 | 236 | | |
| |||
460 | 464 | | |
461 | 465 | | |
462 | 466 | | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
463 | 470 | | |
464 | 471 | | |
465 | 472 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
18 | 22 | | |
19 | 23 | | |
20 | 24 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
| |||
0 commit comments