Skip to content

Releases: wasmerio/wasmer-php

1.1.0

18 May 13:59
d592186
Compare
Choose a tag to compare

Added

  • Introduce the MemoryView class to work with memory contents
  • Implement the memory API as a 1:1 binding on the C API

1.0.0

23 Feb 17:29
c94931f
Compare
Choose a tag to compare
Merge pull request #141 from wasmerio/change-ns

fix: Move everything from Wasm\Module to Wasm\

0.5.1

19 Feb 09:49
a761503
Compare
Choose a tag to compare

Abandoned

The php-wasm/php-wasm has been deprecated in favor of the wasm/wasm package.

1.0.0-beta1

02 Feb 20:48
71e1eee
Compare
Choose a tag to compare
1.0.0-beta1 Pre-release
Pre-release

This release is basically a complete rewrite of Wasmer PHP extension. Previous releases were built on top of a
non-standard API. We are now using the standard [Wasm C API][wasm-c-api]:

<?php declare(strict_types=1);

$engine = wasm_engine_new();
$store = wasm_store_new($engine);

$wasm = file_get_contents(__DIR__ . DIRECTORY_SEPARATOR . 'hello.wasm');

$module = wasm_module_new($store, $wasm);

function hello_callback() {
    echo 'Hello Wasmer (PHP)!' . PHP_EOL;
}

$functype = wasm_functype_new(new Wasm\Vec\ValType(), new Wasm\Vec\ValType());
$func = wasm_func_new($store, $functype, 'hello_callback');
wasm_functype_delete($functype);

$extern = wasm_func_as_extern($func);
$externs = new Wasm\Vec\Extern([$extern]);
$instance = wasm_instance_new($store, $module, $externs);

wasm_func_delete($func);

$exports = wasm_instance_exports($instance);
$run = wasm_extern_as_func($exports[0]);

wasm_module_delete($module);
wasm_instance_delete($instance);

wasm_store_delete($store);
wasm_engine_delete($engine);

wasm_func_call($run, new Wasm\Vec\Val());

⚠️ Expect everything from previous releases to be non-backward compatible.

0.5.0

16 Jul 07:53
Compare
Choose a tag to compare

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

Bug/security fixes

Documentation

  • Many improvements related to the new features and bug fixes.

Chore