From b36fda24ae232cff915596a6d7c496b812796e79 Mon Sep 17 00:00:00 2001 From: Ivan Enderlin Date: Thu, 22 Aug 2019 16:24:15 +0200 Subject: [PATCH 1/3] feat(pecl) Set up `package.xml`. --- package.xml | 124 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 124 insertions(+) create mode 100644 package.xml diff --git a/package.xml b/package.xml new file mode 100644 index 0000000..ed060ba --- /dev/null +++ b/package.xml @@ -0,0 +1,124 @@ + + + wasm + pecl.php.net + Run WebAssembly binaries in PHP + + WebAssembly (abbreviated Wasm) is a binary instruction format for + a stack-based virtual machine. Wasm is designed as a portable target + for compilation of high-level languages like C/C++/Rust, enabling + deployment on the web for client and server applications. + + This extension allows to run Wasm binaries inside PHP. + + + Ivan Enderlin + hywan + ivan.enderlin@hoa-project.net + yes + + 2019-08-22 + + + 0.5.0 + 0.5 + + + stable + stable + + MIT + + # Features + + ## Extension + + * #71 Use pre-build dynamic libraries (@Hywan) + * #70 Improve function invocation time by 77% (@Hywan) + * #69 Introduce the `wasm_instance` structure (@Hywan) + * #68 Add the `WasmArrayBuffer::grow` method (@Hywan) + + ## Runtime + + * #72 Update Wasmer to 0.5.5 (@Hywan) + + # Bug/security fixes + + * #67 Update smallvec (@Hywan) + * #48 Fix the extension compilation on CentOS (@Hywan) + + # Documentation + + * Many improvements related to the new features and bug fixes. + + # Chore + + * #59 Tweak Bors (@Hywan) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 7.2.0 + + + 1.4.0 + + + + wasm + + From d283d8ebf50bdc681b084c7531e4ecab174a98d0 Mon Sep 17 00:00:00 2001 From: Ivan Enderlin Date: Thu, 22 Aug 2019 17:14:41 +0200 Subject: [PATCH 2/3] feat(extension) Set absolute path to dylib. --- src/config.m4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/config.m4 b/src/config.m4 index e19020c..8f50c8e 100644 --- a/src/config.m4 +++ b/src/config.m4 @@ -5,7 +5,7 @@ if test "$PHP_WASM" != "no"; then AC_DEFINE(HAVE_WASM, 1, [ Have wasm support ]) PHP_SUBST(WASM_SHARED_LIBADD) - PHP_ADD_LIBRARY_WITH_PATH(wasmer_runtime_c_api, ., WASM_SHARED_LIBADD) + PHP_ADD_LIBRARY_WITH_PATH(wasmer_runtime_c_api, $ac_pwd, WASM_SHARED_LIBADD) PHP_NEW_EXTENSION(wasm, wasm.cc, $ext_shared) fi From e518f2ab38f575a832cbe7dc4d50600db0e79b82 Mon Sep 17 00:00:00 2001 From: Ivan Enderlin Date: Thu, 22 Aug 2019 17:30:09 +0200 Subject: [PATCH 3/3] doc(readme) Explain how to build with PECL. --- README.md | 19 +++++++++++++++++++ package.xml | 1 - 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index d638c18..dec4c09 100644 --- a/README.md +++ b/README.md @@ -153,6 +153,25 @@ provide more safety and a more user-friendly API. See the [API documentations with examples](https://wasmerio.github.io/php-ext-wasm/wasm/). +### Install with PECL (recommended) + +PECL is the official repository for PHP extensions. This project is +hosted on PECL under the name `wasm`: http://pecl.php.net/wasm. + +```sh +$ pecl install -B wasm +$ cd /tmp/pear/temp/wasm/src +$ phpize +$ export CXX='g++' +$ export CXXFLAGS='-std=c++11' +$ ./configure --with-php-config=$PHP_PREFIX_BIN/php-config +$ make install +``` + +This process will be easier in a close future. + +### Install manually (development) + To compile the entire project, run the following commands: ```sh diff --git a/package.xml b/package.xml index ed060ba..e99845c 100644 --- a/package.xml +++ b/package.xml @@ -102,7 +102,6 @@ -