{"id":18016600,"url":"https://github.com/webassembly/wasi-messaging","last_synced_at":"2025-07-07T19:35:48.932Z","repository":{"id":105883661,"uuid":"536175826","full_name":"WebAssembly/wasi-messaging","owner":"WebAssembly","description":"Messaging proposal for WASI","archived":false,"fork":false,"pushed_at":"2024-12-04T18:09:30.000Z","size":56,"stargazers_count":24,"open_issues_count":5,"forks_count":11,"subscribers_count":18,"default_branch":"main","last_synced_at":"2025-03-22T06:41:50.787Z","etag":null,"topics":["wasi","wasm","wit"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/WebAssembly.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-09-13T14:51:22.000Z","updated_at":"2025-02-19T11:40:50.000Z","dependencies_parsed_at":null,"dependency_job_id":"e216e67a-70ea-435d-95db-86a68f11dd97","html_url":"https://github.com/WebAssembly/wasi-messaging","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":"WebAssembly/wasi-proposal-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WebAssembly%2Fwasi-messaging","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WebAssembly%2Fwasi-messaging/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WebAssembly%2Fwasi-messaging/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WebAssembly%2Fwasi-messaging/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/WebAssembly","download_url":"https://codeload.github.com/WebAssembly/wasi-messaging/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245713043,"owners_count":20660339,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["wasi","wasm","wit"],"created_at":"2024-10-30T04:18:35.892Z","updated_at":"2025-03-26T18:32:21.089Z","avatar_url":"https://github.com/WebAssembly.png","language":null,"readme":"# `wasi-messaging`\n\nA proposed [WebAssembly System Interface](https://github.com/WebAssembly/WASI) API.\n\n## Table of Contents\n\n- [`wasi-messaging`](#wasi-messaging)\n  - [Table of Contents](#table-of-contents)\n  - [Current Phase](#current-phase)\n  - [Champions](#champions)\n  - [Phase 4 Advancement Criteria](#phase-4-advancement-criteria)\n  - [Introduction](#introduction)\n  - [Goals](#goals)\n  - [Portability criteria](#portability-criteria)\n  - [Dev notes](#dev-notes)\n\n## Current Phase\n\n`wasi-messaging` is currently in [Phase\n1](https://github.com/WebAssembly/WASI/blob/main/Proposals.md#phase-1---feature-proposal-cg).\n\n## Champions\n\n- [Dan Chiarlone](https://github.com/danbugs)\n- [David Justice](https://github.com/devigned)\n- [Jiaxiao Zhou](https://github.com/Mossaka)\n- [Taylor Thomas](https://github.com/thomastaylor312)\n\n## Phase 4 Advancement Criteria\n\nFor `wasi-messaging` to advance to Phase 4, it must have at least two independent implementations \nfor open-source message brokers (such as Kafka, NATS, MQTT brokers) and two for cloud service providers \n(e.g., Azure Service Bus, AWS SQS).\n\n## Introduction\n\nIn modern software systems, different components or applications often need to communicate with each other \nto exchange information and coordinate their actions. Messaging systems facilitate this communication by\nallowing messages to be sent and received between different parts of a system.\n\nHowever, implementing message-based communication can be challenging. It requires dealing with the details\nof message brokers, such as connection management, channel setup, and message serialization. This complexity\ncan hinder development and lead to inconsistent implementations.\n\nThe `wasi-messaging` interface is a purposefully small interface focused purely on message passing. It is\ndesigned to express the bare minimum of receiving a message and sending a message, along with an optional\nrequest/reply interface that allows for message-based APIs and/or RPC.\n\nBy providing a standard way to interact with message brokers, the `wasi-messaging` interface aims to simplify\nthis process, hiding the underlying complexity from the user. This aligns with the broader goals of WASI by\npromoting interoperability, modularity, and security in WebAssembly applications.\n\n## Goals\n\nThe primary goal of this interface is to focus on message passing. The only guarantee offered is \nthat publishing a message is handled successfully. No other guarantees are made about the delivery \nof the message or being able to ack/nack a message directly. This minimalist approach provides the \nmost basic foundation of messaging, which can be expanded upon by future interfaces or proposals as \nuse cases emerge.\n\nThis simplicity allows:\n- **Ease of Integration**: Components can easily implement the message handler in this interface, \nwith details such as work dispatch and queuing handled behind the scenes, invisible to the business logic.\n- **Flexibility**: Anything that can send a message can easily be passed into a queue \n(such as a Kafka stream or NATS JetStream) without the knowledge that it is being sent into a queue.\n- **Extensibility**: The paradigm can be expanded by future interfaces (like a queue-based work interface) to handle \nmore complex messaging scenarios. By focusing solely on message passing, the wasi-messaging interface simplifies the \ndevelopment of interoperable WebAssembly modules that can communicate over various messaging systems without being \ntied to any specific implementation.\n\n## Portability criteria\n\nThe main portability criteria on which this should be judged is whether a component can receive and send a message \nfrom all major messaging systems. This includes:\n- Message standards like MQTT and AMQP.\n- Specific technologies like NATS and Kafka.\n- Cloud provider implementations like Azure Service Bus and AWS SQS.\n\nThis _does not_ mean it implements the full set of features of each of the messaging systems. In fact, it is expected \nthat most implementations will need to do work to adapt their system to this interface (e.g., in Kafka, you'd have \nto mark the message as completed once the call to handle returns).\n\nAs mentioned above, this should still be completely compatible with any more advanced use cases of the various \nmessage systems. For example, if you have a queue of work that is currently being handled by pre-existing software\noutside of Wasm components, a component could use this interface to publish messages that get ingested into this queue.\n\nAnother way to state the portability criteria is that this implementation should not break the possibility of a \ncomponent consuming this interface to be integrated with a more advanced messaging use case.\n\n## Dev notes\n\nTo regenerate the `.md` files, run: \n```sh\nwit-bindgen markdown ./wit/ -w imports --html-in-md\nwit-bindgen markdown ./wit/ -w imports-request-reply --html-in-md\nwit-bindgen markdown ./wit/ -w messaging-core --html-in-md\nwit-bindgen markdown ./wit/ -w messaging-request-reply --html-in-md\n```\n\nIt would make sense for a lot of these functions to be asynchronous, but that is not currently natively supported in \nthe component model. Asynchronous support will be added as part of WASI Preview 3. When async support becomes \navailable, we plan to update the wasi-messaging interface to incorporate asynchronous patterns.\n\n\u003e **Note**: Ensure you have version 0.34.0 of `wit-bindgen` installed to avoid compatibility issues.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebassembly%2Fwasi-messaging","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwebassembly%2Fwasi-messaging","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebassembly%2Fwasi-messaging/lists"}