Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Installer] Support WASI-Logging plugin #3425

Merged
merged 3 commits into from
May 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/ignore_words
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,6 @@ cript
wit
createor
inout
anull
anull
thirdparty
totalin
2 changes: 1 addition & 1 deletion .github/workflows/test-install-script.yml
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ jobs:

macos_amd64:
name: macos-amd64
runs-on: macos-latest
runs-on: macos-13

steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-installer-v2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ jobs:
- name: Mac M1
host_runner: macos-14
- name: Mac Intel
host_runner: macos-latest
host_runner: macos-13
name: ${{ matrix.name }}
runs-on: ${{ matrix.host_runner }}

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-python-install-script.yml
Original file line number Diff line number Diff line change
Expand Up @@ -352,8 +352,8 @@ jobs:
fail-fast: false
matrix:
include:
- name: MacOS-latest
host_runner: macos-latest
- name: MacOS-amd64
host_runner: macos-13
package_manager: brew
- name: MacOS-arm64
host_runner: macos-14
Expand Down
2 changes: 1 addition & 1 deletion Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ Features:
* Added helper functions for Windows CLI.
* Added the `WasmEdge_Driver_ArgvCreate()` and `WasmEdge_Driver_ArgvDelete()` APIs to convert UTF-16 arguments to UTF-8.
* Added the `WasmEdge_Driver_SetConsoleOutputCPtoUTF8()` API to set the output code page to UTF-8.
* Added the unifed tool API.
* Added the unified tool API.
* Added the `WasmEdge_Driver_UniTool()` API to trigger the WasmEdge CLI tool with command line arguments.

Fixed issues:
Expand Down
2 changes: 1 addition & 1 deletion test/expected/catch.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12478,7 +12478,7 @@ namespace Catch {
}
void close() override {
TrackerBase::close();
// Generator interface only finds out if it has another item on atual move
// Generator interface only finds out if it has another item on actual move
if (m_runState == CompletedSuccessfully && m_generator->next()) {
m_children.clear();
m_runState = Executing;
Expand Down
8 changes: 8 additions & 0 deletions utils/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,7 @@ def compare(self, version2, separator=". |-", ignorecase=True):
WASI_NN_GGML_CUDA = "wasi_nn-ggml-cuda"
WASI_NN_GGML_NOAVX = "wasi_nn-ggml-noavx"
WASI_NN_GGML_BLAS = "wasi_nn-ggml-blas"
WASI_LOGGING = "wasi_logging"
WASMEDGE_TENSORFLOW_PLUGIN = WASMEDGE.lower() + "_" + TENSORFLOW
WASMEDGE_TENSORFLOW_LITE_PLUGIN = WASMEDGE.lower() + "_" + TENSORFLOW_LITE_P
WASMEDGE_IMAGE_PLUGIN = WASMEDGE.lower() + "_" + IMAGE
Expand All @@ -356,6 +357,7 @@ def compare(self, version2, separator=". |-", ignorecase=True):
WASI_NN_GGML_CUDA,
WASI_NN_GGML_NOAVX,
WASI_NN_GGML_BLAS,
WASI_LOGGING,
WASMEDGE_TENSORFLOW_PLUGIN,
WASMEDGE_TENSORFLOW_LITE_PLUGIN,
WASMEDGE_IMAGE_PLUGIN,
Expand Down Expand Up @@ -404,6 +406,12 @@ def compare(self, version2, separator=". |-", ignorecase=True):
"manylinux2014" + "x86_64" + WASMEDGE_IMAGE_PLUGIN: VersionString("0.13.0"),
"manylinux2014" + "aarch64" + WASMEDGE_IMAGE_PLUGIN: VersionString("0.13.0"),
"ubuntu20.04" + "x86_64" + WASMEDGE_IMAGE_PLUGIN: VersionString("0.13.0"),
"darwin" + "x86_64" + WASI_LOGGING: VersionString("0.14.0"),
"darwin" + "arm64" + WASI_LOGGING: VersionString("0.13.5"),
"manylinux2014" + "aarch64" + WASI_LOGGING: VersionString("0.13.5"),
"manylinux2014" + "x86_64" + WASI_LOGGING: VersionString("0.13.5"),
"ubuntu20.04" + "x86_64" + WASI_LOGGING: VersionString("0.13.5"),
"ubuntu20.04" + "aarch64" + WASI_LOGGING: VersionString("0.14.0"),
"darwin" + "x86_64" + WASMEDGE_RUSTLS: VersionString("0.13.4"),
"darwin" + "arm64" + WASMEDGE_RUSTLS: VersionString("0.13.4"),
"manylinux2014" + "aarch64" + WASMEDGE_RUSTLS: VersionString("0.13.5"),
Expand Down
12 changes: 12 additions & 0 deletions utils/install_v2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@ check_os_arch() {
IPATH="$__HOME__/.wasmedge"
VERBOSE=0
LEGACY=0
ENABLE_WASI_LOGGING=0
ENABLE_RUSTLS=0
ENABLE_NOAVX=0
GGML_BUILD_NUMBER=""
Expand Down Expand Up @@ -295,6 +296,9 @@ usage() {
--rustls Install the Rustls plugin.
Default is disabled.

--wasi_logging Install the WASI Logging plugin.
Default is disabled.

--ggmlbn=[b2963] Install the specific GGML plugin.
Default is the latest.

Expand Down Expand Up @@ -434,6 +438,14 @@ get_wasmedge_rustls_plugin() {
_extractor -C "${TMP_PLUGIN_DIR}" -vxzf "${TMP_DIR}/WasmEdge-plugin-wasmedge_rustls-${VERSION}-${RELEASE_PKG}"
}

get_wasmedge_wasi_logging_plugin() {
info "Fetching WASI-Logging-Plugin"
_downloader "https://github.com/WasmEdge/WasmEdge/releases/download/$VERSION/WasmEdge-plugin-wasi_logging-$VERSION-$RELEASE_PKG"
local TMP_PLUGIN_DIR="${TMP_DIR}/${IPKG}/plugin"
mkdir -p "${TMP_PLUGIN_DIR}"
_extractor -C "${TMP_PLUGIN_DIR}" -vxzf "${TMP_DIR}/WasmEdge-plugin-wasi_logging-${VERSION}-${RELEASE_PKG}"
}

wasmedge_checks() {
if [ "${ARCH}" == $(uname -m) ] && [ "${OS}" == $(uname) ] ; then
# Check only MAJOR.MINOR.PATCH
Expand Down
Loading