This version bumps Wasmtime to 10.0.2 to include PR #6372.
- Dependencies:
- Upgrading Wasmtime dependency:
wasmtime
from10.0.1
to10.0.2
.
- Updated
cargo.lock
dependencies viacargo update
.
- Upgrading Wasmtime dependency:
This version bumps Wasmtime to 10.0.1 to include PR #6348 and other improvements such as preliminary support for WASI preview 2.
- Dependencies:
- Upgrading Wasmtime dependency:
wasmtime
from7.0.1
to10.0.1
.once_cell
to1.18.0
.
- Updated
cargo.lock
dependencies viacargo update
.
- Upgrading Wasmtime dependency:
This version introduces a new Apache directive: WasmMapCGIFileNames
.
It enables/disables the mapping of SCRIPT_FILENAME
based on the different WasmMapDir
instances when WasmEnableCGI
is enabled.
In addition, it normalizes filename paths for both Windows and Linux styles.
WasmEnableCGI On
WasmMapCGIFileNames On
WasmMapDir /app C:/myapp/htdocs
In the example, SCRIPT_FILENAME
will store /app/index.php
instead of the host path C:/myapp/htdocs/index.php
.
Without this setting, we would also need to provide a WasmDir
granting access to C:/myapp/htdocs
as the Wasm module would be trying to access it (or setting WasmMapDir C:/myapp/htdocs C:/myapp/htdocs
).
This release fixes a regression issue introduced in 0.11.2 when opening directories on Windows. It doesn't affect other platforms.
The issue is realated to Wasmtime 8.0.1 (see PR #6348), so downgrading to 7.0.1
.
- Dependencies:
- Downgrading Wasmtime dependency:
wasmtime
from8.0.1
to7.0.1
.
- Updated
cargo.lock
dependencies viacargo update
.
- Downgrading Wasmtime dependency:
This is a security update to bump Wasmtime to 8.0.1 given the CVE published (low severity) and addressed in:
- Dependencies:
- Bump version dependencies:
wasmtime
to8.0.1
.anyhow
to1.0.71
.
- Updated
cargo.lock
dependencies viacargo update
.
- Bump version dependencies:
- Fixes #40, where a new thread could not create a new Wasm execution context while another thread was running a Wasm module. This was only measurable if the execution of the Wasm module was long enough in time or if it took longer than expected (i.e.: I/O issues, infinite loop, etc.). Note that CPU-limited Wasm executions are not implemented yet (see #9).
- Internal refactoring of
execution_ctx.rs
to address #40. - Updated
cargo.lock
dependencies viacargo update
.
- In this version, Wasm modules can now return any output type via stdout, including binaries with non UTF-8 bytes sequences or
\0
NULL terminators in the middle. - Also added some minor improvements for error management and building scripts.
- Support for the new
wasm_executionctx_run()
signature in the wasm_runtime C-API. - Better error management when invoking
ap_scan_script_header_err_strs()
. - Some improvements in
build.sh
per #36.
- Now the Wasm module
stdout
is modelled as aVec<u8>
instead of aString
:- This prevents an exception when a module emits a non UTF-8 output.
- New signature for
wasm_executionctx_run()
in the C-API now requires buffer and length pointers:- This allows NULL terminators (
\0
) in the middle of the output to be managed by C without truncating the string (ie.: requiresfwrite()
instead offprintf()
, etc.).
- This allows NULL terminators (
- Better
clean_all
target in Makefile. - Dependencies:
- Bump version dependencies:
wasmtime
to7.0.0
.anyhow
to1.0.70
.
- Updated
cargo.lock
dependencies viacargo update
.
- Bump version dependencies:
- Enabling
mod_rewrite
. - Adding
/php-hello-slim
demo. - Adding
WasmEnv TMPDIR /tmp
directive to all PHP-related demos. - Adding stubs for Drupal and Drupal-Zero demos (still WIP).
This is a security update to bump Wasmtime to 6.0.1 given the two CVE published (one critical) and addressed in:
- Dependencies:
- Bump version dependencies:
wasmtime
to6.0.1
.anyhow
to1.0.69
.once_cell
to1.17.1
.
- Updated
cargo.lock
dependencies viacargo update
.
- Bump version dependencies:
- Dependencies:
- Bump version dependencies:
wasmtime
to4.0.0
.- As a consequence, update code to invoke
get_typed_func<Params, Results>()
with only two arguments.
- As a consequence, update code to invoke
anyhow
to1.0.66
.once_cell
to1.17.0
.
- Updated
cargo.lock
dependencies viacargo update
.
- Bump version dependencies:
- All logging is now properly route to
ap_log_error()
,ap_log_perror()
andap_log_rerror()
. - Apache-2.0 extended license headers.
- Only C89 comments (/* */).
- Dependencies:
- Bump version dependencies:
wasmtime
to3.0.1
.
- Updated
cargo.lock
dependencies viacargo update
.
- Bump version dependencies:
-
In this version, among other improvements, we introduce two major features implementing #6, #7, and #16.
-
Wasm multi-module support:
Now you can specify different Wasm modules to be used in different routes. For instance, now it’s possible with one-single Apache instance to load simultaneously the Wasm builds for the PHP and Python interpreters (and any other languages that compile to Wasm now or in the future).
-
Shared Wasm modules:
Now you can specify different per-route configurations to the same Wasm module. The Wasm binary is loaded in memory only once, and the different configurations are applied to the Wasm module per-HTTP request. Also, now each Wasm execution owns its own
stdout
buffer, so there are no interlocks between executions anymore.
Combining all together, you can now have a more flexible configuration such as:
<Location /wordpress> SetHandler wasm-handler WasmModule /var/www/modules/php7.4.32.wasm WasmDir /tmp … </Location> <Location /python-app> SetHandler wasm-handler WasmModule /var/www/modules/python3.11.wasm WasmArg /var/www/python-app/app.py … </Location> <Location /python-app2> SetHandler wasm-handler WasmModule /var/www/modules/python3.11.wasm WasmArg /var/www/python-app2/app2.py … </Location>
-
- Removed the
WasmRoot
directive. Now,WasmModule
accepts the full Wasm module filepath. - Removed legacy code:
- In previous versions, given the only-one Wasm module limitation,
mod_wasm.c
implemented a mechanism to reset the WASI context for each HTTP request. This is not needed anymore. - Old code inherited from
mod_example_hooks.c
and not used.
- In previous versions, given the only-one Wasm module limitation,
- C-API:
- Reorganized functions and their names to be compliant with the new features and to be more idiomatic (🚨 breaks backwards compatibility 🚨).
- Removed any kind of logic different from C <---> Rust FFI data transformation.
- Improved error messages with more information.
- Fixed most suggestions from
cargo clippy -- -W clippy::pedantic
. - Dependencies:
- Bump version dependencies:
wasmtime
to3.0.0
.once_cell
to1.16.0
.
- New dependency:
rand
to0.8.5
.
- Updated
cargo.lock
dependencies viacargo update
.
- Bump version dependencies:
- Updated documentation.
- Added
libxml2-dev
as a dependency for buildingmod_wasm.so
. - Added version check mechanism when building
mod_wasm.so
. Now it checkslibwasm_runtime.so
version is compatible and the minimum required.
- Fixed directory hierarchy to be compliant with Apache Server (httpd).
- Bump version dependencies:
wasmtime
to2.0.2
(and other related Wasmtime crates).
- Added support for sending HTTP Request body into WASI
stdin
.
- Fixed build for aarm64.
- Bump project version to
0.5.0
since it has been successfully tested with Python and PHP Wasm modules by other developers.
- Bump version dependencies:
wasmtime
to2.0.0
.anyhow
to1.0.66
.once_cell
to1.15.0
.
- Initial
mod_wasm
version!