Skip to content

Document Proxy-Wasm ABI v0.2.0. - #51

Merged
PiotrSikora merged 2 commits into
proxy-wasm:mainfrom
PiotrSikora:v0.2.0
Aug 14, 2024
Merged

PiotrSikora merged 2 commits into
proxy-wasm:mainfrom
PiotrSikora:v0.2.0

Conversation

@PiotrSikora

Copy link
Copy Markdown
Member

No description provided.

@PiotrSikora

Copy link
Copy Markdown
Member Author

This is pretty trivial update:

diff -u abi-versions/v0.2.{0,1}/README.md
--- abi-versions/v0.2.0/README.md       2024-08-07 16:13:04.836878636 -0400
+++ abi-versions/v0.2.1/README.md       2024-08-07 16:12:20.688649849 -0400
@@ -1,4 +1,4 @@
-# Proxy-Wasm ABI v0.2.0 specification
+# Proxy-Wasm ABI v0.2.1 specification
 
 ---
 
@@ -53,7 +53,7 @@
 
 ### Callbacks exposed by the Wasm module
 
-#### `proxy_abi_version_0_2_0`
+#### `proxy_abi_version_0_2_1`
 
 * params:
   - none
@@ -61,7 +61,7 @@
   - none
 
 Function marker used during linking to advertise Wasm module's support
-for Proxy-Wasm ABI v0.2.0.
+for Proxy-Wasm ABI v0.2.1.
 
 This function is never called.
 
@@ -333,6 +333,29 @@
   point to invalid memory address.
 
 
+#### `proxy_get_log_level`
+
+* params:
+  - `i32 (`[`proxy_log_level_t`]` *) return_log_level`
+* returns:
+  - `i32 (`[`proxy_status_t`]`) status`
+
+Retrieves host's current log level (`return_log_level`).
+
+This can be used to avoid creating log entries that are going to be
+discarded by the host.
+
+> **Note**
+> Hosts might change the log level at runtime, and currently there is
+> no callback to notify the Wasm module about it, so `return_log_level`
+> can become stale.
+
+Returned `status` value is:
+- `OK` on success.
+- `INVALID_MEMORY_ACCESS` when `return_log_level` points to invalid
+  memory address.
+
+
 ## Clocks
 
 ### Functions exposed by the host
@@ -2058,11 +2081,18 @@
 - `MONOTONIC` = `1`
 
 
+# Changes from [v0.2.0]
+
+- Added [`proxy_get_log_level`].
+
+
+[v0.2.0]: ../v0.2.0
+
 [integration]: #Integration
 [memory management]: #Memory-management
 [serialized]: #Serialization
 
-[`proxy_abi_version_0_2_0`]: #proxy_abi_version_0_2_0
+[`proxy_abi_version_0_2_1`]: #proxy_abi_version_0_2_1
 [`_initialize`]: #_initialize
 [`main`]: #main
 [`_start`]: #_start

@PiotrSikora PiotrSikora left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is mostly a stepping stone for documenting v0.1.0, and kicking off process for v0.3.0.

Comment thread abi-versions/v0.2.1/README.md Resolved
@PiotrSikora PiotrSikora linked an issue Aug 11, 2024 that may be closed by this pull request
@PiotrSikora
PiotrSikora merged commit 90d832b into proxy-wasm:main Aug 14, 2024
@PiotrSikora
PiotrSikora deleted the v0.2.0 branch August 14, 2024 21:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Spec documentation for v0.1.0?

2 participants