@php-wasm/web-8-1 3.1.2 → 3.1.4
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.
- package/asyncify/8_1_34/php_8_1.wasm +0 -0
- package/asyncify/php_8_1.js +113 -44
- package/index.cjs +2 -2
- package/index.js +2 -2
- package/jspi/8_1_34/php_8_1.wasm +0 -0
- package/jspi/extensions/intl/{8_1/intl.so → intl.so} +0 -0
- package/jspi/php_8_1.js +1962 -19578
- package/package.json +3 -3
- /package/asyncify/extensions/intl/{8_1/intl.la → intl.la} +0 -0
- /package/asyncify/extensions/intl/{8_1/intl.so → intl.so} +0 -0
- /package/jspi/extensions/intl/{8_1/intl.la → intl.la} +0 -0
|
Binary file
|
package/asyncify/php_8_1.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import dependencyFilename from './8_1_34/php_8_1.wasm';
|
|
2
2
|
export { dependencyFilename };
|
|
3
|
-
export const dependenciesTotalSize =
|
|
3
|
+
export const dependenciesTotalSize = 24505763;
|
|
4
4
|
const phpVersionString = '8.1.34';
|
|
5
5
|
export function init(RuntimeName, PHPLoader) {
|
|
6
6
|
// The rest of the code comes from the built php.js file and esm-suffix.js
|
|
@@ -4930,6 +4930,8 @@ export function init(RuntimeName, PHPLoader) {
|
|
|
4930
4930
|
}
|
|
4931
4931
|
___syscall_chmod.sig = 'ipi';
|
|
4932
4932
|
var allocateUTF8OnStack = (...args) => stringToUTF8OnStack(...args);
|
|
4933
|
+
var onInits = [];
|
|
4934
|
+
var addOnInit = (cb) => onInits.push(cb);
|
|
4933
4935
|
function _js_getpid() {
|
|
4934
4936
|
return PHPLoader.processId ?? 42;
|
|
4935
4937
|
}
|
|
@@ -4946,8 +4948,13 @@ export function init(RuntimeName, PHPLoader) {
|
|
|
4946
4948
|
init: function () {
|
|
4947
4949
|
if (PHPLoader.bindUserSpace) {
|
|
4948
4950
|
addOnInit(() => {
|
|
4951
|
+
if (typeof PHPLoader.processId !== 'number') {
|
|
4952
|
+
throw new Error(
|
|
4953
|
+
'PHPLoader.processId must be set before init'
|
|
4954
|
+
);
|
|
4955
|
+
}
|
|
4949
4956
|
Module['userSpace'] = PHPLoader.bindUserSpace({
|
|
4950
|
-
pid: PHPLoader.processId
|
|
4957
|
+
pid: PHPLoader.processId,
|
|
4951
4958
|
constants: {
|
|
4952
4959
|
F_GETFL: Number('3'),
|
|
4953
4960
|
O_ACCMODE: Number('2097155'),
|
|
@@ -4985,18 +4992,97 @@ export function init(RuntimeName, PHPLoader) {
|
|
|
4985
4992
|
},
|
|
4986
4993
|
errnoCodes: ERRNO_CODES,
|
|
4987
4994
|
memory: {
|
|
4988
|
-
HEAP8
|
|
4989
|
-
|
|
4990
|
-
|
|
4991
|
-
|
|
4992
|
-
|
|
4993
|
-
|
|
4994
|
-
|
|
4995
|
-
|
|
4996
|
-
|
|
4997
|
-
|
|
4995
|
+
HEAP8: {
|
|
4996
|
+
get(offset) {
|
|
4997
|
+
return HEAP8[offset];
|
|
4998
|
+
},
|
|
4999
|
+
set(offset, value) {
|
|
5000
|
+
HEAP8[offset] = value;
|
|
5001
|
+
},
|
|
5002
|
+
},
|
|
5003
|
+
HEAPU8: {
|
|
5004
|
+
get(offset) {
|
|
5005
|
+
return HEAPU8[offset];
|
|
5006
|
+
},
|
|
5007
|
+
set(offset, value) {
|
|
5008
|
+
HEAPU8[offset] = value;
|
|
5009
|
+
},
|
|
5010
|
+
},
|
|
5011
|
+
HEAP16: {
|
|
5012
|
+
get(offset) {
|
|
5013
|
+
return HEAP16[offset];
|
|
5014
|
+
},
|
|
5015
|
+
set(offset, value) {
|
|
5016
|
+
HEAP16[offset] = value;
|
|
5017
|
+
},
|
|
5018
|
+
},
|
|
5019
|
+
HEAPU16: {
|
|
5020
|
+
get(offset) {
|
|
5021
|
+
return HEAPU16[offset];
|
|
5022
|
+
},
|
|
5023
|
+
set(offset, value) {
|
|
5024
|
+
HEAPU16[offset] = value;
|
|
5025
|
+
},
|
|
5026
|
+
},
|
|
5027
|
+
HEAP32: {
|
|
5028
|
+
get(offset) {
|
|
5029
|
+
return HEAP32[offset];
|
|
5030
|
+
},
|
|
5031
|
+
set(offset, value) {
|
|
5032
|
+
HEAP32[offset] = value;
|
|
5033
|
+
},
|
|
5034
|
+
},
|
|
5035
|
+
HEAPU32: {
|
|
5036
|
+
get(offset) {
|
|
5037
|
+
return HEAPU32[offset];
|
|
5038
|
+
},
|
|
5039
|
+
set(offset, value) {
|
|
5040
|
+
HEAPU32[offset] = value;
|
|
5041
|
+
},
|
|
5042
|
+
},
|
|
5043
|
+
HEAPF32: {
|
|
5044
|
+
get(offset) {
|
|
5045
|
+
return HEAPF32[offset];
|
|
5046
|
+
},
|
|
5047
|
+
set(offset, value) {
|
|
5048
|
+
HEAPF32[offset] = value;
|
|
5049
|
+
},
|
|
5050
|
+
},
|
|
5051
|
+
HEAP64: {
|
|
5052
|
+
get(offset) {
|
|
5053
|
+
return HEAP64[offset];
|
|
5054
|
+
},
|
|
5055
|
+
set(offset, value) {
|
|
5056
|
+
HEAP64[offset] = value;
|
|
5057
|
+
},
|
|
5058
|
+
},
|
|
5059
|
+
HEAPU64: {
|
|
5060
|
+
get(offset) {
|
|
5061
|
+
return HEAPU64[offset];
|
|
5062
|
+
},
|
|
5063
|
+
set(offset, value) {
|
|
5064
|
+
HEAPU64[offset] = value;
|
|
5065
|
+
},
|
|
5066
|
+
},
|
|
5067
|
+
HEAPF64: {
|
|
5068
|
+
get(offset) {
|
|
5069
|
+
return HEAPF64[offset];
|
|
5070
|
+
},
|
|
5071
|
+
set(offset, value) {
|
|
5072
|
+
HEAPF64[offset] = value;
|
|
5073
|
+
},
|
|
5074
|
+
},
|
|
4998
5075
|
},
|
|
4999
|
-
wasmImports
|
|
5076
|
+
wasmImports: Object.assign(
|
|
5077
|
+
{},
|
|
5078
|
+
wasmImports,
|
|
5079
|
+
typeof _builtin_fd_close === 'function'
|
|
5080
|
+
? { builtin_fd_close: _builtin_fd_close }
|
|
5081
|
+
: {},
|
|
5082
|
+
typeof _builtin_fcntl64 === 'function'
|
|
5083
|
+
? { builtin_fcntl64: _builtin_fcntl64 }
|
|
5084
|
+
: {}
|
|
5085
|
+
),
|
|
5000
5086
|
wasmExports,
|
|
5001
5087
|
syscalls: SYSCALLS,
|
|
5002
5088
|
FS,
|
|
@@ -13701,9 +13787,9 @@ export function init(RuntimeName, PHPLoader) {
|
|
|
13701
13787
|
if (!cp.stdin.closed) {
|
|
13702
13788
|
cp.stdin.end();
|
|
13703
13789
|
}
|
|
13704
|
-
|
|
13705
|
-
|
|
13706
|
-
|
|
13790
|
+
_wasm_free(buffer);
|
|
13791
|
+
_wasm_free(iov);
|
|
13792
|
+
_wasm_free(pnum);
|
|
13707
13793
|
}
|
|
13708
13794
|
const interval = setInterval(pump, 20);
|
|
13709
13795
|
pump();
|
|
@@ -14249,7 +14335,17 @@ export function init(RuntimeName, PHPLoader) {
|
|
|
14249
14335
|
reachedAfterCallback = true;
|
|
14250
14336
|
if (!reachedCallback) {
|
|
14251
14337
|
Asyncify.state = Asyncify.State.Unwinding;
|
|
14252
|
-
|
|
14338
|
+
if (!Asyncify._cachedData) {
|
|
14339
|
+
Asyncify._cachedData = Asyncify.allocateData();
|
|
14340
|
+
} else {
|
|
14341
|
+
Asyncify.setDataHeader(
|
|
14342
|
+
Asyncify._cachedData,
|
|
14343
|
+
Asyncify._cachedData + 12,
|
|
14344
|
+
Asyncify.StackSize
|
|
14345
|
+
);
|
|
14346
|
+
Asyncify.setDataRewindFunc(Asyncify._cachedData);
|
|
14347
|
+
}
|
|
14348
|
+
Asyncify.currData = Asyncify._cachedData;
|
|
14253
14349
|
if (typeof MainLoop != 'undefined' && MainLoop.func) {
|
|
14254
14350
|
MainLoop.pause();
|
|
14255
14351
|
}
|
|
@@ -14260,7 +14356,6 @@ export function init(RuntimeName, PHPLoader) {
|
|
|
14260
14356
|
} else if (Asyncify.state === Asyncify.State.Rewinding) {
|
|
14261
14357
|
Asyncify.state = Asyncify.State.Normal;
|
|
14262
14358
|
runAndAbortIfError(_asyncify_stop_rewind);
|
|
14263
|
-
_free(Asyncify.currData);
|
|
14264
14359
|
Asyncify.currData = null;
|
|
14265
14360
|
Asyncify.sleepCallbacks.forEach(callUserCallback);
|
|
14266
14361
|
} else {
|
|
@@ -14588,8 +14683,6 @@ export function init(RuntimeName, PHPLoader) {
|
|
|
14588
14683
|
} while (HEAPU32[ptr >> 2]);
|
|
14589
14684
|
};
|
|
14590
14685
|
__emscripten_fs_load_embedded_files.sig = 'vp';
|
|
14591
|
-
var onInits = [];
|
|
14592
|
-
var addOnInit = (cb) => onInits.push(cb);
|
|
14593
14686
|
var onMains = [];
|
|
14594
14687
|
var addOnPreMain = (cb) => onMains.push(cb);
|
|
14595
14688
|
var onExits = [];
|
|
@@ -24496,24 +24589,6 @@ export function init(RuntimeName, PHPLoader) {
|
|
|
24496
24589
|
poll();
|
|
24497
24590
|
});
|
|
24498
24591
|
};
|
|
24499
|
-
function _recv(sockfd, buffer, size, flags) {
|
|
24500
|
-
return _wasm_recv(sockfd, buffer, size, flags);
|
|
24501
|
-
}
|
|
24502
|
-
function _setsockopt(
|
|
24503
|
-
socketd,
|
|
24504
|
-
level,
|
|
24505
|
-
optionName,
|
|
24506
|
-
optionValuePtr,
|
|
24507
|
-
optionLen
|
|
24508
|
-
) {
|
|
24509
|
-
return _wasm_setsockopt(
|
|
24510
|
-
socketd,
|
|
24511
|
-
level,
|
|
24512
|
-
optionName,
|
|
24513
|
-
optionValuePtr,
|
|
24514
|
-
optionLen
|
|
24515
|
-
);
|
|
24516
|
-
}
|
|
24517
24592
|
var _getdtablesize = () => abort('missing function: ${name}');
|
|
24518
24593
|
var webSockets = new HandleAllocator();
|
|
24519
24594
|
var WS = {
|
|
@@ -24887,8 +24962,6 @@ export function init(RuntimeName, PHPLoader) {
|
|
|
24887
24962
|
Module['___cxa_rethrow_primary_exception'] =
|
|
24888
24963
|
___cxa_rethrow_primary_exception;
|
|
24889
24964
|
Module['___syscall_shutdown'] = ___syscall_shutdown;
|
|
24890
|
-
Module['_recv'] = _recv;
|
|
24891
|
-
Module['_setsockopt'] = _setsockopt;
|
|
24892
24965
|
var ASM_CONSTS = {
|
|
24893
24966
|
13047425: ($0) => {
|
|
24894
24967
|
if (!$0) {
|
|
@@ -26728,11 +26801,7 @@ export function init(RuntimeName, PHPLoader) {
|
|
|
26728
26801
|
wasm_connect: _wasm_connect,
|
|
26729
26802
|
wasm_poll_socket,
|
|
26730
26803
|
wasm_recv: _wasm_recv,
|
|
26731
|
-
/** */
|
|
26732
|
-
recv: _recv,
|
|
26733
26804
|
wasm_setsockopt: _wasm_setsockopt,
|
|
26734
|
-
/** */
|
|
26735
|
-
setsockopt: _setsockopt,
|
|
26736
26805
|
wasm_shutdown: _wasm_shutdown,
|
|
26737
26806
|
zoomSurface: _zoomSurface,
|
|
26738
26807
|
};
|
package/index.cjs
CHANGED
|
@@ -44,8 +44,8 @@ async function getPHPLoaderModule() {
|
|
|
44
44
|
}
|
|
45
45
|
async function getIntlExtensionPath() {
|
|
46
46
|
if (await (0, import_wasm_feature_detect.jspi)()) {
|
|
47
|
-
return (await import("./jspi/extensions/intl/
|
|
47
|
+
return (await import("./jspi/extensions/intl/intl.so?url")).default;
|
|
48
48
|
} else {
|
|
49
|
-
return (await import("./asyncify/extensions/intl/
|
|
49
|
+
return (await import("./asyncify/extensions/intl/intl.so?url")).default;
|
|
50
50
|
}
|
|
51
51
|
}
|
package/index.js
CHANGED
|
@@ -9,9 +9,9 @@ async function getPHPLoaderModule() {
|
|
|
9
9
|
}
|
|
10
10
|
async function getIntlExtensionPath() {
|
|
11
11
|
if (await jspi()) {
|
|
12
|
-
return (await import("./jspi/extensions/intl/
|
|
12
|
+
return (await import("./jspi/extensions/intl/intl.so?url")).default;
|
|
13
13
|
} else {
|
|
14
|
-
return (await import("./asyncify/extensions/intl/
|
|
14
|
+
return (await import("./asyncify/extensions/intl/intl.so?url")).default;
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
17
|
export {
|
package/jspi/8_1_34/php_8_1.wasm
CHANGED
|
Binary file
|
|
Binary file
|