@php-wasm/node 1.2.2 → 2.0.0
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/7_2_34/php_7_2.wasm +0 -0
- package/asyncify/7_3_33/php_7_3.wasm +0 -0
- package/asyncify/7_4_33/php_7_4.wasm +0 -0
- package/asyncify/8_0_30/php_8_0.wasm +0 -0
- package/asyncify/{8_1_23 → 8_1_33}/php_8_1.wasm +0 -0
- package/asyncify/{8_2_10 → 8_2_29}/php_8_2.wasm +0 -0
- package/asyncify/{8_3_0 → 8_3_23}/php_8_3.wasm +0 -0
- package/asyncify/{8_4_0 → 8_4_10}/php_8_4.wasm +0 -0
- package/asyncify/extensions/xdebug/7_2/xdebug.so +0 -0
- package/asyncify/extensions/xdebug/7_3/xdebug.so +0 -0
- package/asyncify/extensions/xdebug/7_4/xdebug.so +0 -0
- package/asyncify/extensions/xdebug/8_0/xdebug.so +0 -0
- package/asyncify/extensions/xdebug/8_1/xdebug.so +0 -0
- package/asyncify/extensions/xdebug/8_2/xdebug.so +0 -0
- package/asyncify/extensions/xdebug/8_3/xdebug.so +0 -0
- package/asyncify/extensions/xdebug/8_4/xdebug.so +0 -0
- package/asyncify/php_7_2.js +61 -51
- package/asyncify/php_7_3.js +75 -51
- package/asyncify/php_7_4.js +88 -51
- package/asyncify/php_8_0.js +79 -56
- package/asyncify/php_8_1.js +92 -55
- package/asyncify/php_8_2.js +92 -55
- package/asyncify/php_8_3.js +92 -55
- package/asyncify/php_8_4.js +90 -53
- package/index.cjs +906 -562
- package/index.js +907 -561
- package/jspi/7_2_34/php_7_2.wasm +0 -0
- package/jspi/7_3_33/php_7_3.wasm +0 -0
- package/jspi/7_4_33/php_7_4.wasm +0 -0
- package/jspi/8_0_30/php_8_0.wasm +0 -0
- package/jspi/{8_1_23 → 8_1_33}/php_8_1.wasm +0 -0
- package/jspi/{8_2_10 → 8_2_29}/php_8_2.wasm +0 -0
- package/jspi/{8_3_0 → 8_3_23}/php_8_3.wasm +0 -0
- package/jspi/{8_4_0 → 8_4_10}/php_8_4.wasm +0 -0
- package/jspi/php_7_2.js +29 -15
- package/jspi/php_7_3.js +29 -15
- package/jspi/php_7_4.js +29 -15
- package/jspi/php_8_0.js +29 -15
- package/jspi/php_8_1.js +30 -16
- package/jspi/php_8_2.js +30 -16
- package/jspi/php_8_3.js +30 -16
- package/jspi/php_8_4.js +30 -16
- package/lib/node-fs-mount.d.ts +1 -1
- package/package.json +7 -7
package/jspi/7_2_34/php_7_2.wasm
CHANGED
|
Binary file
|
package/jspi/7_3_33/php_7_3.wasm
CHANGED
|
Binary file
|
package/jspi/7_4_33/php_7_4.wasm
CHANGED
|
Binary file
|
package/jspi/8_0_30/php_8_0.wasm
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/jspi/php_7_2.js
CHANGED
|
@@ -8,7 +8,8 @@ import path from 'path';
|
|
|
8
8
|
|
|
9
9
|
const dependencyFilename = path.join(__dirname, '7_2_34', 'php_7_2.wasm');
|
|
10
10
|
export { dependencyFilename };
|
|
11
|
-
export const dependenciesTotalSize =
|
|
11
|
+
export const dependenciesTotalSize = 28865031;
|
|
12
|
+
const phpVersionString = '7.2.34';
|
|
12
13
|
export function init(RuntimeName, PHPLoader) {
|
|
13
14
|
// The rest of the code comes from the built php.js file and esm-suffix.js
|
|
14
15
|
// include: shell.js
|
|
@@ -847,7 +848,7 @@ export function init(RuntimeName, PHPLoader) {
|
|
|
847
848
|
},
|
|
848
849
|
};
|
|
849
850
|
|
|
850
|
-
var ___heap_base =
|
|
851
|
+
var ___heap_base = 12424800;
|
|
851
852
|
|
|
852
853
|
var alignMemory = (size, alignment) => {
|
|
853
854
|
return Math.ceil(size / alignment) * alignment;
|
|
@@ -1011,7 +1012,7 @@ export function init(RuntimeName, PHPLoader) {
|
|
|
1011
1012
|
|
|
1012
1013
|
/** @type {WebAssembly.Table} */
|
|
1013
1014
|
var wasmTable = new WebAssembly.Table({
|
|
1014
|
-
initial:
|
|
1015
|
+
initial: 15576,
|
|
1015
1016
|
element: 'anyfunc',
|
|
1016
1017
|
});
|
|
1017
1018
|
var getWasmTableEntry = (funcPtr) => {
|
|
@@ -1742,13 +1743,13 @@ export function init(RuntimeName, PHPLoader) {
|
|
|
1742
1743
|
1024
|
|
1743
1744
|
);
|
|
1744
1745
|
|
|
1745
|
-
var ___stack_high =
|
|
1746
|
+
var ___stack_high = 12424800;
|
|
1746
1747
|
|
|
1747
|
-
var ___stack_low =
|
|
1748
|
+
var ___stack_low = 11376224;
|
|
1748
1749
|
|
|
1749
1750
|
var ___stack_pointer = new WebAssembly.Global(
|
|
1750
1751
|
{ value: 'i32', mutable: true },
|
|
1751
|
-
|
|
1752
|
+
12424800
|
|
1752
1753
|
);
|
|
1753
1754
|
|
|
1754
1755
|
var PATH = {
|
|
@@ -3802,10 +3803,6 @@ export function init(RuntimeName, PHPLoader) {
|
|
|
3802
3803
|
if (FS.isMountpoint(node)) {
|
|
3803
3804
|
throw new FS.ErrnoError(10);
|
|
3804
3805
|
}
|
|
3805
|
-
|
|
3806
|
-
if (!FS.isDir(node.mode)) {
|
|
3807
|
-
throw new FS.ErrnoError(54);
|
|
3808
|
-
}
|
|
3809
3806
|
}
|
|
3810
3807
|
|
|
3811
3808
|
var mount = {
|
|
@@ -6885,7 +6882,7 @@ export function init(RuntimeName, PHPLoader) {
|
|
|
6885
6882
|
}
|
|
6886
6883
|
}
|
|
6887
6884
|
|
|
6888
|
-
function
|
|
6885
|
+
var _fd_close = function fd_close(fd) {
|
|
6889
6886
|
return Asyncify.handleAsync(async () => {
|
|
6890
6887
|
const [vfsPath, pathResolutionErrno] =
|
|
6891
6888
|
locking.get_vfs_path_from_fd(fd);
|
|
@@ -6920,7 +6917,7 @@ export function init(RuntimeName, PHPLoader) {
|
|
|
6920
6917
|
}
|
|
6921
6918
|
return result;
|
|
6922
6919
|
});
|
|
6923
|
-
}
|
|
6920
|
+
};
|
|
6924
6921
|
_fd_close.sig = 'ii';
|
|
6925
6922
|
function _builtin_fd_close(fd) {
|
|
6926
6923
|
try {
|
|
@@ -19323,7 +19320,7 @@ export function init(RuntimeName, PHPLoader) {
|
|
|
19323
19320
|
|
|
19324
19321
|
var addOnExit = (cb) => onExits.unshift(cb);
|
|
19325
19322
|
|
|
19326
|
-
var STACK_SIZE =
|
|
19323
|
+
var STACK_SIZE = 1048576;
|
|
19327
19324
|
|
|
19328
19325
|
var STACK_ALIGN = 16;
|
|
19329
19326
|
|
|
@@ -31256,13 +31253,13 @@ export function init(RuntimeName, PHPLoader) {
|
|
|
31256
31253
|
// End JS library code
|
|
31257
31254
|
|
|
31258
31255
|
var ASM_CONSTS = {
|
|
31259
|
-
|
|
31256
|
+
10409966: ($0) => {
|
|
31260
31257
|
if (!$0) {
|
|
31261
31258
|
AL.alcErr = 0xa004;
|
|
31262
31259
|
return 1;
|
|
31263
31260
|
}
|
|
31264
31261
|
},
|
|
31265
|
-
|
|
31262
|
+
10410014: ($0) => {
|
|
31266
31263
|
if (!AL.currentCtx) {
|
|
31267
31264
|
err('alGetProcAddress() called without a valid context');
|
|
31268
31265
|
return 1;
|
|
@@ -31390,6 +31387,9 @@ export function init(RuntimeName, PHPLoader) {
|
|
|
31390
31387
|
while (true) {
|
|
31391
31388
|
var mask = POLLNVAL;
|
|
31392
31389
|
mask = SYSCALLS.DEFAULT_POLLMASK;
|
|
31390
|
+
if (FS.isClosed(stream)) {
|
|
31391
|
+
return ERRNO_CODES.EBADF;
|
|
31392
|
+
}
|
|
31393
31393
|
if (stream.stream_ops?.poll) {
|
|
31394
31394
|
mask = stream.stream_ops.poll(stream, -1);
|
|
31395
31395
|
}
|
|
@@ -34189,6 +34189,11 @@ export function init(RuntimeName, PHPLoader) {
|
|
|
34189
34189
|
a0,
|
|
34190
34190
|
a1
|
|
34191
34191
|
));
|
|
34192
|
+
var _initgroups = (Module['_initgroups'] = (a0, a1) =>
|
|
34193
|
+
(_initgroups = Module['_initgroups'] = wasmExports['initgroups'])(
|
|
34194
|
+
a0,
|
|
34195
|
+
a1
|
|
34196
|
+
));
|
|
34192
34197
|
var _memcpy = (a0, a1, a2) => (_memcpy = wasmExports['memcpy'])(a0, a1, a2);
|
|
34193
34198
|
var ___funcs_on_exit = () =>
|
|
34194
34199
|
(___funcs_on_exit = wasmExports['__funcs_on_exit'])();
|
|
@@ -34425,6 +34430,15 @@ export function init(RuntimeName, PHPLoader) {
|
|
|
34425
34430
|
};
|
|
34426
34431
|
}
|
|
34427
34432
|
|
|
34433
|
+
/**
|
|
34434
|
+
* Expose the PHP version so the PHP class can make version-specific
|
|
34435
|
+
* adjustments to `php.ini`.
|
|
34436
|
+
*/
|
|
34437
|
+
PHPLoader['phpVersion'] = (() => {
|
|
34438
|
+
const [major, minor, patch] = phpVersionString.split('.').map(Number);
|
|
34439
|
+
return { major, minor, patch };
|
|
34440
|
+
})();
|
|
34441
|
+
|
|
34428
34442
|
return PHPLoader;
|
|
34429
34443
|
|
|
34430
34444
|
// Close the opening bracket from esm-prefix.js:
|
package/jspi/php_7_3.js
CHANGED
|
@@ -8,7 +8,8 @@ import path from 'path';
|
|
|
8
8
|
|
|
9
9
|
const dependencyFilename = path.join(__dirname, '7_3_33', 'php_7_3.wasm');
|
|
10
10
|
export { dependencyFilename };
|
|
11
|
-
export const dependenciesTotalSize =
|
|
11
|
+
export const dependenciesTotalSize = 29193979;
|
|
12
|
+
const phpVersionString = '7.3.33';
|
|
12
13
|
export function init(RuntimeName, PHPLoader) {
|
|
13
14
|
// The rest of the code comes from the built php.js file and esm-suffix.js
|
|
14
15
|
// include: shell.js
|
|
@@ -847,7 +848,7 @@ export function init(RuntimeName, PHPLoader) {
|
|
|
847
848
|
},
|
|
848
849
|
};
|
|
849
850
|
|
|
850
|
-
var ___heap_base =
|
|
851
|
+
var ___heap_base = 12760416;
|
|
851
852
|
|
|
852
853
|
var alignMemory = (size, alignment) => {
|
|
853
854
|
return Math.ceil(size / alignment) * alignment;
|
|
@@ -1011,7 +1012,7 @@ export function init(RuntimeName, PHPLoader) {
|
|
|
1011
1012
|
|
|
1012
1013
|
/** @type {WebAssembly.Table} */
|
|
1013
1014
|
var wasmTable = new WebAssembly.Table({
|
|
1014
|
-
initial:
|
|
1015
|
+
initial: 15542,
|
|
1015
1016
|
element: 'anyfunc',
|
|
1016
1017
|
});
|
|
1017
1018
|
var getWasmTableEntry = (funcPtr) => {
|
|
@@ -1742,13 +1743,13 @@ export function init(RuntimeName, PHPLoader) {
|
|
|
1742
1743
|
1024
|
|
1743
1744
|
);
|
|
1744
1745
|
|
|
1745
|
-
var ___stack_high =
|
|
1746
|
+
var ___stack_high = 12760416;
|
|
1746
1747
|
|
|
1747
|
-
var ___stack_low =
|
|
1748
|
+
var ___stack_low = 11711840;
|
|
1748
1749
|
|
|
1749
1750
|
var ___stack_pointer = new WebAssembly.Global(
|
|
1750
1751
|
{ value: 'i32', mutable: true },
|
|
1751
|
-
|
|
1752
|
+
12760416
|
|
1752
1753
|
);
|
|
1753
1754
|
|
|
1754
1755
|
var PATH = {
|
|
@@ -3802,10 +3803,6 @@ export function init(RuntimeName, PHPLoader) {
|
|
|
3802
3803
|
if (FS.isMountpoint(node)) {
|
|
3803
3804
|
throw new FS.ErrnoError(10);
|
|
3804
3805
|
}
|
|
3805
|
-
|
|
3806
|
-
if (!FS.isDir(node.mode)) {
|
|
3807
|
-
throw new FS.ErrnoError(54);
|
|
3808
|
-
}
|
|
3809
3806
|
}
|
|
3810
3807
|
|
|
3811
3808
|
var mount = {
|
|
@@ -6885,7 +6882,7 @@ export function init(RuntimeName, PHPLoader) {
|
|
|
6885
6882
|
}
|
|
6886
6883
|
}
|
|
6887
6884
|
|
|
6888
|
-
function
|
|
6885
|
+
var _fd_close = function fd_close(fd) {
|
|
6889
6886
|
return Asyncify.handleAsync(async () => {
|
|
6890
6887
|
const [vfsPath, pathResolutionErrno] =
|
|
6891
6888
|
locking.get_vfs_path_from_fd(fd);
|
|
@@ -6920,7 +6917,7 @@ export function init(RuntimeName, PHPLoader) {
|
|
|
6920
6917
|
}
|
|
6921
6918
|
return result;
|
|
6922
6919
|
});
|
|
6923
|
-
}
|
|
6920
|
+
};
|
|
6924
6921
|
_fd_close.sig = 'ii';
|
|
6925
6922
|
function _builtin_fd_close(fd) {
|
|
6926
6923
|
try {
|
|
@@ -19323,7 +19320,7 @@ export function init(RuntimeName, PHPLoader) {
|
|
|
19323
19320
|
|
|
19324
19321
|
var addOnExit = (cb) => onExits.unshift(cb);
|
|
19325
19322
|
|
|
19326
|
-
var STACK_SIZE =
|
|
19323
|
+
var STACK_SIZE = 1048576;
|
|
19327
19324
|
|
|
19328
19325
|
var STACK_ALIGN = 16;
|
|
19329
19326
|
|
|
@@ -31256,13 +31253,13 @@ export function init(RuntimeName, PHPLoader) {
|
|
|
31256
31253
|
// End JS library code
|
|
31257
31254
|
|
|
31258
31255
|
var ASM_CONSTS = {
|
|
31259
|
-
|
|
31256
|
+
10815374: ($0) => {
|
|
31260
31257
|
if (!$0) {
|
|
31261
31258
|
AL.alcErr = 0xa004;
|
|
31262
31259
|
return 1;
|
|
31263
31260
|
}
|
|
31264
31261
|
},
|
|
31265
|
-
|
|
31262
|
+
10815422: ($0) => {
|
|
31266
31263
|
if (!AL.currentCtx) {
|
|
31267
31264
|
err('alGetProcAddress() called without a valid context');
|
|
31268
31265
|
return 1;
|
|
@@ -31390,6 +31387,9 @@ export function init(RuntimeName, PHPLoader) {
|
|
|
31390
31387
|
while (true) {
|
|
31391
31388
|
var mask = POLLNVAL;
|
|
31392
31389
|
mask = SYSCALLS.DEFAULT_POLLMASK;
|
|
31390
|
+
if (FS.isClosed(stream)) {
|
|
31391
|
+
return ERRNO_CODES.EBADF;
|
|
31392
|
+
}
|
|
31393
31393
|
if (stream.stream_ops?.poll) {
|
|
31394
31394
|
mask = stream.stream_ops.poll(stream, -1);
|
|
31395
31395
|
}
|
|
@@ -34189,6 +34189,11 @@ export function init(RuntimeName, PHPLoader) {
|
|
|
34189
34189
|
a0,
|
|
34190
34190
|
a1
|
|
34191
34191
|
));
|
|
34192
|
+
var _initgroups = (Module['_initgroups'] = (a0, a1) =>
|
|
34193
|
+
(_initgroups = Module['_initgroups'] = wasmExports['initgroups'])(
|
|
34194
|
+
a0,
|
|
34195
|
+
a1
|
|
34196
|
+
));
|
|
34192
34197
|
var _memcpy = (a0, a1, a2) => (_memcpy = wasmExports['memcpy'])(a0, a1, a2);
|
|
34193
34198
|
var ___funcs_on_exit = () =>
|
|
34194
34199
|
(___funcs_on_exit = wasmExports['__funcs_on_exit'])();
|
|
@@ -34425,6 +34430,15 @@ export function init(RuntimeName, PHPLoader) {
|
|
|
34425
34430
|
};
|
|
34426
34431
|
}
|
|
34427
34432
|
|
|
34433
|
+
/**
|
|
34434
|
+
* Expose the PHP version so the PHP class can make version-specific
|
|
34435
|
+
* adjustments to `php.ini`.
|
|
34436
|
+
*/
|
|
34437
|
+
PHPLoader['phpVersion'] = (() => {
|
|
34438
|
+
const [major, minor, patch] = phpVersionString.split('.').map(Number);
|
|
34439
|
+
return { major, minor, patch };
|
|
34440
|
+
})();
|
|
34441
|
+
|
|
34428
34442
|
return PHPLoader;
|
|
34429
34443
|
|
|
34430
34444
|
// Close the opening bracket from esm-prefix.js:
|
package/jspi/php_7_4.js
CHANGED
|
@@ -8,7 +8,8 @@ import path from 'path';
|
|
|
8
8
|
|
|
9
9
|
const dependencyFilename = path.join(__dirname, '7_4_33', 'php_7_4.wasm');
|
|
10
10
|
export { dependencyFilename };
|
|
11
|
-
export const dependenciesTotalSize =
|
|
11
|
+
export const dependenciesTotalSize = 29566253;
|
|
12
|
+
const phpVersionString = '7.4.33';
|
|
12
13
|
export function init(RuntimeName, PHPLoader) {
|
|
13
14
|
// The rest of the code comes from the built php.js file and esm-suffix.js
|
|
14
15
|
// include: shell.js
|
|
@@ -847,7 +848,7 @@ export function init(RuntimeName, PHPLoader) {
|
|
|
847
848
|
},
|
|
848
849
|
};
|
|
849
850
|
|
|
850
|
-
var ___heap_base =
|
|
851
|
+
var ___heap_base = 13084960;
|
|
851
852
|
|
|
852
853
|
var alignMemory = (size, alignment) => {
|
|
853
854
|
return Math.ceil(size / alignment) * alignment;
|
|
@@ -1011,7 +1012,7 @@ export function init(RuntimeName, PHPLoader) {
|
|
|
1011
1012
|
|
|
1012
1013
|
/** @type {WebAssembly.Table} */
|
|
1013
1014
|
var wasmTable = new WebAssembly.Table({
|
|
1014
|
-
initial:
|
|
1015
|
+
initial: 15290,
|
|
1015
1016
|
element: 'anyfunc',
|
|
1016
1017
|
});
|
|
1017
1018
|
var getWasmTableEntry = (funcPtr) => {
|
|
@@ -1742,13 +1743,13 @@ export function init(RuntimeName, PHPLoader) {
|
|
|
1742
1743
|
1024
|
|
1743
1744
|
);
|
|
1744
1745
|
|
|
1745
|
-
var ___stack_high =
|
|
1746
|
+
var ___stack_high = 13084960;
|
|
1746
1747
|
|
|
1747
|
-
var ___stack_low =
|
|
1748
|
+
var ___stack_low = 12036384;
|
|
1748
1749
|
|
|
1749
1750
|
var ___stack_pointer = new WebAssembly.Global(
|
|
1750
1751
|
{ value: 'i32', mutable: true },
|
|
1751
|
-
|
|
1752
|
+
13084960
|
|
1752
1753
|
);
|
|
1753
1754
|
|
|
1754
1755
|
var PATH = {
|
|
@@ -3802,10 +3803,6 @@ export function init(RuntimeName, PHPLoader) {
|
|
|
3802
3803
|
if (FS.isMountpoint(node)) {
|
|
3803
3804
|
throw new FS.ErrnoError(10);
|
|
3804
3805
|
}
|
|
3805
|
-
|
|
3806
|
-
if (!FS.isDir(node.mode)) {
|
|
3807
|
-
throw new FS.ErrnoError(54);
|
|
3808
|
-
}
|
|
3809
3806
|
}
|
|
3810
3807
|
|
|
3811
3808
|
var mount = {
|
|
@@ -6885,7 +6882,7 @@ export function init(RuntimeName, PHPLoader) {
|
|
|
6885
6882
|
}
|
|
6886
6883
|
}
|
|
6887
6884
|
|
|
6888
|
-
function
|
|
6885
|
+
var _fd_close = function fd_close(fd) {
|
|
6889
6886
|
return Asyncify.handleAsync(async () => {
|
|
6890
6887
|
const [vfsPath, pathResolutionErrno] =
|
|
6891
6888
|
locking.get_vfs_path_from_fd(fd);
|
|
@@ -6920,7 +6917,7 @@ export function init(RuntimeName, PHPLoader) {
|
|
|
6920
6917
|
}
|
|
6921
6918
|
return result;
|
|
6922
6919
|
});
|
|
6923
|
-
}
|
|
6920
|
+
};
|
|
6924
6921
|
_fd_close.sig = 'ii';
|
|
6925
6922
|
function _builtin_fd_close(fd) {
|
|
6926
6923
|
try {
|
|
@@ -19327,7 +19324,7 @@ export function init(RuntimeName, PHPLoader) {
|
|
|
19327
19324
|
|
|
19328
19325
|
var addOnExit = (cb) => onExits.unshift(cb);
|
|
19329
19326
|
|
|
19330
|
-
var STACK_SIZE =
|
|
19327
|
+
var STACK_SIZE = 1048576;
|
|
19331
19328
|
|
|
19332
19329
|
var STACK_ALIGN = 16;
|
|
19333
19330
|
|
|
@@ -31256,13 +31253,13 @@ export function init(RuntimeName, PHPLoader) {
|
|
|
31256
31253
|
// End JS library code
|
|
31257
31254
|
|
|
31258
31255
|
var ASM_CONSTS = {
|
|
31259
|
-
|
|
31256
|
+
11139230: ($0) => {
|
|
31260
31257
|
if (!$0) {
|
|
31261
31258
|
AL.alcErr = 0xa004;
|
|
31262
31259
|
return 1;
|
|
31263
31260
|
}
|
|
31264
31261
|
},
|
|
31265
|
-
|
|
31262
|
+
11139278: ($0) => {
|
|
31266
31263
|
if (!AL.currentCtx) {
|
|
31267
31264
|
err('alGetProcAddress() called without a valid context');
|
|
31268
31265
|
return 1;
|
|
@@ -31390,6 +31387,9 @@ export function init(RuntimeName, PHPLoader) {
|
|
|
31390
31387
|
while (true) {
|
|
31391
31388
|
var mask = POLLNVAL;
|
|
31392
31389
|
mask = SYSCALLS.DEFAULT_POLLMASK;
|
|
31390
|
+
if (FS.isClosed(stream)) {
|
|
31391
|
+
return ERRNO_CODES.EBADF;
|
|
31392
|
+
}
|
|
31393
31393
|
if (stream.stream_ops?.poll) {
|
|
31394
31394
|
mask = stream.stream_ops.poll(stream, -1);
|
|
31395
31395
|
}
|
|
@@ -34106,6 +34106,11 @@ export function init(RuntimeName, PHPLoader) {
|
|
|
34106
34106
|
(_wasm_sleep = Module['_wasm_sleep'] = wasmExports['wasm_sleep'])(a0));
|
|
34107
34107
|
var ___cxa_throw = (a0, a1, a2) =>
|
|
34108
34108
|
(___cxa_throw = wasmExports['__cxa_throw'])(a0, a1, a2);
|
|
34109
|
+
var _initgroups = (Module['_initgroups'] = (a0, a1) =>
|
|
34110
|
+
(_initgroups = Module['_initgroups'] = wasmExports['initgroups'])(
|
|
34111
|
+
a0,
|
|
34112
|
+
a1
|
|
34113
|
+
));
|
|
34109
34114
|
var ___wrap_usleep = (Module['___wrap_usleep'] = (a0) =>
|
|
34110
34115
|
(___wrap_usleep = Module['___wrap_usleep'] =
|
|
34111
34116
|
wasmExports['__wrap_usleep'])(a0));
|
|
@@ -34425,6 +34430,15 @@ export function init(RuntimeName, PHPLoader) {
|
|
|
34425
34430
|
};
|
|
34426
34431
|
}
|
|
34427
34432
|
|
|
34433
|
+
/**
|
|
34434
|
+
* Expose the PHP version so the PHP class can make version-specific
|
|
34435
|
+
* adjustments to `php.ini`.
|
|
34436
|
+
*/
|
|
34437
|
+
PHPLoader['phpVersion'] = (() => {
|
|
34438
|
+
const [major, minor, patch] = phpVersionString.split('.').map(Number);
|
|
34439
|
+
return { major, minor, patch };
|
|
34440
|
+
})();
|
|
34441
|
+
|
|
34428
34442
|
return PHPLoader;
|
|
34429
34443
|
|
|
34430
34444
|
// Close the opening bracket from esm-prefix.js:
|
package/jspi/php_8_0.js
CHANGED
|
@@ -8,7 +8,8 @@ import path from 'path';
|
|
|
8
8
|
|
|
9
9
|
const dependencyFilename = path.join(__dirname, '8_0_30', 'php_8_0.wasm');
|
|
10
10
|
export { dependencyFilename };
|
|
11
|
-
export const dependenciesTotalSize =
|
|
11
|
+
export const dependenciesTotalSize = 30759315;
|
|
12
|
+
const phpVersionString = '8.0.30';
|
|
12
13
|
export function init(RuntimeName, PHPLoader) {
|
|
13
14
|
// The rest of the code comes from the built php.js file and esm-suffix.js
|
|
14
15
|
// include: shell.js
|
|
@@ -847,7 +848,7 @@ export function init(RuntimeName, PHPLoader) {
|
|
|
847
848
|
},
|
|
848
849
|
};
|
|
849
850
|
|
|
850
|
-
var ___heap_base =
|
|
851
|
+
var ___heap_base = 14177504;
|
|
851
852
|
|
|
852
853
|
var alignMemory = (size, alignment) => {
|
|
853
854
|
return Math.ceil(size / alignment) * alignment;
|
|
@@ -1011,7 +1012,7 @@ export function init(RuntimeName, PHPLoader) {
|
|
|
1011
1012
|
|
|
1012
1013
|
/** @type {WebAssembly.Table} */
|
|
1013
1014
|
var wasmTable = new WebAssembly.Table({
|
|
1014
|
-
initial:
|
|
1015
|
+
initial: 15404,
|
|
1015
1016
|
element: 'anyfunc',
|
|
1016
1017
|
});
|
|
1017
1018
|
var getWasmTableEntry = (funcPtr) => {
|
|
@@ -1742,13 +1743,13 @@ export function init(RuntimeName, PHPLoader) {
|
|
|
1742
1743
|
1024
|
|
1743
1744
|
);
|
|
1744
1745
|
|
|
1745
|
-
var ___stack_high =
|
|
1746
|
+
var ___stack_high = 14177504;
|
|
1746
1747
|
|
|
1747
|
-
var ___stack_low =
|
|
1748
|
+
var ___stack_low = 13128928;
|
|
1748
1749
|
|
|
1749
1750
|
var ___stack_pointer = new WebAssembly.Global(
|
|
1750
1751
|
{ value: 'i32', mutable: true },
|
|
1751
|
-
|
|
1752
|
+
14177504
|
|
1752
1753
|
);
|
|
1753
1754
|
|
|
1754
1755
|
var PATH = {
|
|
@@ -3802,10 +3803,6 @@ export function init(RuntimeName, PHPLoader) {
|
|
|
3802
3803
|
if (FS.isMountpoint(node)) {
|
|
3803
3804
|
throw new FS.ErrnoError(10);
|
|
3804
3805
|
}
|
|
3805
|
-
|
|
3806
|
-
if (!FS.isDir(node.mode)) {
|
|
3807
|
-
throw new FS.ErrnoError(54);
|
|
3808
|
-
}
|
|
3809
3806
|
}
|
|
3810
3807
|
|
|
3811
3808
|
var mount = {
|
|
@@ -6885,7 +6882,7 @@ export function init(RuntimeName, PHPLoader) {
|
|
|
6885
6882
|
}
|
|
6886
6883
|
}
|
|
6887
6884
|
|
|
6888
|
-
function
|
|
6885
|
+
var _fd_close = function fd_close(fd) {
|
|
6889
6886
|
return Asyncify.handleAsync(async () => {
|
|
6890
6887
|
const [vfsPath, pathResolutionErrno] =
|
|
6891
6888
|
locking.get_vfs_path_from_fd(fd);
|
|
@@ -6920,7 +6917,7 @@ export function init(RuntimeName, PHPLoader) {
|
|
|
6920
6917
|
}
|
|
6921
6918
|
return result;
|
|
6922
6919
|
});
|
|
6923
|
-
}
|
|
6920
|
+
};
|
|
6924
6921
|
_fd_close.sig = 'ii';
|
|
6925
6922
|
function _builtin_fd_close(fd) {
|
|
6926
6923
|
try {
|
|
@@ -19327,7 +19324,7 @@ export function init(RuntimeName, PHPLoader) {
|
|
|
19327
19324
|
|
|
19328
19325
|
var addOnExit = (cb) => onExits.unshift(cb);
|
|
19329
19326
|
|
|
19330
|
-
var STACK_SIZE =
|
|
19327
|
+
var STACK_SIZE = 1048576;
|
|
19331
19328
|
|
|
19332
19329
|
var STACK_ALIGN = 16;
|
|
19333
19330
|
|
|
@@ -31256,13 +31253,13 @@ export function init(RuntimeName, PHPLoader) {
|
|
|
31256
31253
|
// End JS library code
|
|
31257
31254
|
|
|
31258
31255
|
var ASM_CONSTS = {
|
|
31259
|
-
|
|
31256
|
+
12161278: ($0) => {
|
|
31260
31257
|
if (!$0) {
|
|
31261
31258
|
AL.alcErr = 0xa004;
|
|
31262
31259
|
return 1;
|
|
31263
31260
|
}
|
|
31264
31261
|
},
|
|
31265
|
-
|
|
31262
|
+
12161326: ($0) => {
|
|
31266
31263
|
if (!AL.currentCtx) {
|
|
31267
31264
|
err('alGetProcAddress() called without a valid context');
|
|
31268
31265
|
return 1;
|
|
@@ -31390,6 +31387,9 @@ export function init(RuntimeName, PHPLoader) {
|
|
|
31390
31387
|
while (true) {
|
|
31391
31388
|
var mask = POLLNVAL;
|
|
31392
31389
|
mask = SYSCALLS.DEFAULT_POLLMASK;
|
|
31390
|
+
if (FS.isClosed(stream)) {
|
|
31391
|
+
return ERRNO_CODES.EBADF;
|
|
31392
|
+
}
|
|
31393
31393
|
if (stream.stream_ops?.poll) {
|
|
31394
31394
|
mask = stream.stream_ops.poll(stream, -1);
|
|
31395
31395
|
}
|
|
@@ -34106,6 +34106,11 @@ export function init(RuntimeName, PHPLoader) {
|
|
|
34106
34106
|
var ___cxa_throw = (a0, a1, a2) =>
|
|
34107
34107
|
(___cxa_throw = wasmExports['__cxa_throw'])(a0, a1, a2);
|
|
34108
34108
|
var _calloc = (a0, a1) => (_calloc = wasmExports['calloc'])(a0, a1);
|
|
34109
|
+
var _initgroups = (Module['_initgroups'] = (a0, a1) =>
|
|
34110
|
+
(_initgroups = Module['_initgroups'] = wasmExports['initgroups'])(
|
|
34111
|
+
a0,
|
|
34112
|
+
a1
|
|
34113
|
+
));
|
|
34109
34114
|
var ___wrap_usleep = (Module['___wrap_usleep'] = (a0) =>
|
|
34110
34115
|
(___wrap_usleep = Module['___wrap_usleep'] =
|
|
34111
34116
|
wasmExports['__wrap_usleep'])(a0));
|
|
@@ -34425,6 +34430,15 @@ export function init(RuntimeName, PHPLoader) {
|
|
|
34425
34430
|
};
|
|
34426
34431
|
}
|
|
34427
34432
|
|
|
34433
|
+
/**
|
|
34434
|
+
* Expose the PHP version so the PHP class can make version-specific
|
|
34435
|
+
* adjustments to `php.ini`.
|
|
34436
|
+
*/
|
|
34437
|
+
PHPLoader['phpVersion'] = (() => {
|
|
34438
|
+
const [major, minor, patch] = phpVersionString.split('.').map(Number);
|
|
34439
|
+
return { major, minor, patch };
|
|
34440
|
+
})();
|
|
34441
|
+
|
|
34428
34442
|
return PHPLoader;
|
|
34429
34443
|
|
|
34430
34444
|
// Close the opening bracket from esm-prefix.js:
|
package/jspi/php_8_1.js
CHANGED
|
@@ -6,9 +6,10 @@ const require = createRequire(import.meta.url);
|
|
|
6
6
|
// Note: The path module is currently needed by code injected by the php-wasm Dockerfile.
|
|
7
7
|
import path from 'path';
|
|
8
8
|
|
|
9
|
-
const dependencyFilename = path.join(__dirname, '
|
|
9
|
+
const dependencyFilename = path.join(__dirname, '8_1_33', 'php_8_1.wasm');
|
|
10
10
|
export { dependencyFilename };
|
|
11
|
-
export const dependenciesTotalSize =
|
|
11
|
+
export const dependenciesTotalSize = 31100909;
|
|
12
|
+
const phpVersionString = '8.1.33';
|
|
12
13
|
export function init(RuntimeName, PHPLoader) {
|
|
13
14
|
// The rest of the code comes from the built php.js file and esm-suffix.js
|
|
14
15
|
// include: shell.js
|
|
@@ -847,7 +848,7 @@ export function init(RuntimeName, PHPLoader) {
|
|
|
847
848
|
},
|
|
848
849
|
};
|
|
849
850
|
|
|
850
|
-
var ___heap_base =
|
|
851
|
+
var ___heap_base = 14258208;
|
|
851
852
|
|
|
852
853
|
var alignMemory = (size, alignment) => {
|
|
853
854
|
return Math.ceil(size / alignment) * alignment;
|
|
@@ -1011,7 +1012,7 @@ export function init(RuntimeName, PHPLoader) {
|
|
|
1011
1012
|
|
|
1012
1013
|
/** @type {WebAssembly.Table} */
|
|
1013
1014
|
var wasmTable = new WebAssembly.Table({
|
|
1014
|
-
initial:
|
|
1015
|
+
initial: 15458,
|
|
1015
1016
|
element: 'anyfunc',
|
|
1016
1017
|
});
|
|
1017
1018
|
var getWasmTableEntry = (funcPtr) => {
|
|
@@ -1742,13 +1743,13 @@ export function init(RuntimeName, PHPLoader) {
|
|
|
1742
1743
|
1024
|
|
1743
1744
|
);
|
|
1744
1745
|
|
|
1745
|
-
var ___stack_high =
|
|
1746
|
+
var ___stack_high = 14258208;
|
|
1746
1747
|
|
|
1747
|
-
var ___stack_low =
|
|
1748
|
+
var ___stack_low = 13209632;
|
|
1748
1749
|
|
|
1749
1750
|
var ___stack_pointer = new WebAssembly.Global(
|
|
1750
1751
|
{ value: 'i32', mutable: true },
|
|
1751
|
-
|
|
1752
|
+
14258208
|
|
1752
1753
|
);
|
|
1753
1754
|
|
|
1754
1755
|
var PATH = {
|
|
@@ -3802,10 +3803,6 @@ export function init(RuntimeName, PHPLoader) {
|
|
|
3802
3803
|
if (FS.isMountpoint(node)) {
|
|
3803
3804
|
throw new FS.ErrnoError(10);
|
|
3804
3805
|
}
|
|
3805
|
-
|
|
3806
|
-
if (!FS.isDir(node.mode)) {
|
|
3807
|
-
throw new FS.ErrnoError(54);
|
|
3808
|
-
}
|
|
3809
3806
|
}
|
|
3810
3807
|
|
|
3811
3808
|
var mount = {
|
|
@@ -6885,7 +6882,7 @@ export function init(RuntimeName, PHPLoader) {
|
|
|
6885
6882
|
}
|
|
6886
6883
|
}
|
|
6887
6884
|
|
|
6888
|
-
function
|
|
6885
|
+
var _fd_close = function fd_close(fd) {
|
|
6889
6886
|
return Asyncify.handleAsync(async () => {
|
|
6890
6887
|
const [vfsPath, pathResolutionErrno] =
|
|
6891
6888
|
locking.get_vfs_path_from_fd(fd);
|
|
@@ -6920,7 +6917,7 @@ export function init(RuntimeName, PHPLoader) {
|
|
|
6920
6917
|
}
|
|
6921
6918
|
return result;
|
|
6922
6919
|
});
|
|
6923
|
-
}
|
|
6920
|
+
};
|
|
6924
6921
|
_fd_close.sig = 'ii';
|
|
6925
6922
|
function _builtin_fd_close(fd) {
|
|
6926
6923
|
try {
|
|
@@ -19333,7 +19330,7 @@ export function init(RuntimeName, PHPLoader) {
|
|
|
19333
19330
|
|
|
19334
19331
|
var addOnExit = (cb) => onExits.unshift(cb);
|
|
19335
19332
|
|
|
19336
|
-
var STACK_SIZE =
|
|
19333
|
+
var STACK_SIZE = 1048576;
|
|
19337
19334
|
|
|
19338
19335
|
var STACK_ALIGN = 16;
|
|
19339
19336
|
|
|
@@ -31256,13 +31253,13 @@ export function init(RuntimeName, PHPLoader) {
|
|
|
31256
31253
|
// End JS library code
|
|
31257
31254
|
|
|
31258
31255
|
var ASM_CONSTS = {
|
|
31259
|
-
|
|
31256
|
+
12242382: ($0) => {
|
|
31260
31257
|
if (!$0) {
|
|
31261
31258
|
AL.alcErr = 0xa004;
|
|
31262
31259
|
return 1;
|
|
31263
31260
|
}
|
|
31264
31261
|
},
|
|
31265
|
-
|
|
31262
|
+
12242430: ($0) => {
|
|
31266
31263
|
if (!AL.currentCtx) {
|
|
31267
31264
|
err('alGetProcAddress() called without a valid context');
|
|
31268
31265
|
return 1;
|
|
@@ -31390,6 +31387,9 @@ export function init(RuntimeName, PHPLoader) {
|
|
|
31390
31387
|
while (true) {
|
|
31391
31388
|
var mask = POLLNVAL;
|
|
31392
31389
|
mask = SYSCALLS.DEFAULT_POLLMASK;
|
|
31390
|
+
if (FS.isClosed(stream)) {
|
|
31391
|
+
return ERRNO_CODES.EBADF;
|
|
31392
|
+
}
|
|
31393
31393
|
if (stream.stream_ops?.poll) {
|
|
31394
31394
|
mask = stream.stream_ops.poll(stream, -1);
|
|
31395
31395
|
}
|
|
@@ -34106,6 +34106,11 @@ export function init(RuntimeName, PHPLoader) {
|
|
|
34106
34106
|
var ___cxa_throw = (a0, a1, a2) =>
|
|
34107
34107
|
(___cxa_throw = wasmExports['__cxa_throw'])(a0, a1, a2);
|
|
34108
34108
|
var _calloc = (a0, a1) => (_calloc = wasmExports['calloc'])(a0, a1);
|
|
34109
|
+
var _initgroups = (Module['_initgroups'] = (a0, a1) =>
|
|
34110
|
+
(_initgroups = Module['_initgroups'] = wasmExports['initgroups'])(
|
|
34111
|
+
a0,
|
|
34112
|
+
a1
|
|
34113
|
+
));
|
|
34109
34114
|
var ___wrap_usleep = (Module['___wrap_usleep'] = (a0) =>
|
|
34110
34115
|
(___wrap_usleep = Module['___wrap_usleep'] =
|
|
34111
34116
|
wasmExports['__wrap_usleep'])(a0));
|
|
@@ -34425,6 +34430,15 @@ export function init(RuntimeName, PHPLoader) {
|
|
|
34425
34430
|
};
|
|
34426
34431
|
}
|
|
34427
34432
|
|
|
34433
|
+
/**
|
|
34434
|
+
* Expose the PHP version so the PHP class can make version-specific
|
|
34435
|
+
* adjustments to `php.ini`.
|
|
34436
|
+
*/
|
|
34437
|
+
PHPLoader['phpVersion'] = (() => {
|
|
34438
|
+
const [major, minor, patch] = phpVersionString.split('.').map(Number);
|
|
34439
|
+
return { major, minor, patch };
|
|
34440
|
+
})();
|
|
34441
|
+
|
|
34428
34442
|
return PHPLoader;
|
|
34429
34443
|
|
|
34430
34444
|
// Close the opening bracket from esm-prefix.js:
|