You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2021/10/21 01:06:20 UTC

[GitHub] [apisix] spacewander commented on a change in pull request #5288: feat: initial wasm support

spacewander commented on a change in pull request #5288:
URL: https://github.com/apache/apisix/pull/5288#discussion_r733247909



##########
File path: docs/en/latest/wasm.md
##########
@@ -0,0 +1,96 @@
+---
+title: WASM
+---
+
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+
+APISIX supports WASM plugins written with [Proxy WASM SDK](https://github.com/proxy-wasm/spec#sdks).
+
+This plugin requires APISIX to run on [APISIX-OpenResty](../how-to-build.md#step-6-build-openresty-for-apache-apisix), and is under construction.
+Currently, only a few APIs are implemented. Please follow [wasm-nginx-module](https://github.com/api7/wasm-nginx-module) to know the progress.
+
+## Programming model
+
+The plugin supports the follwing concepts from Proxy WASM:
+
+```
+                    Wasm Virtual Machine
+┌────────────────────────────────────────────────────────────────┐
+│      Your Plugin                                               │
+│          │                                                     │
+│          │ 1: 1                                                │
+│          │         1: N                                        │
+│      VMContext  ──────────  PluginContext                      │
+│                                           ╲ 1: N               │
+│                                            ╲                   │
+│                                             ╲  HttpContext     │
+│                                               (Http stream)    │
+└────────────────────────────────────────────────────────────────┘
+```
+
+* All plugin run in the same WASM VM, like the Lua plugin in the Lua VM
+* Each plugin has its own VMContext (the root ctx)
+* Each configured route/global rules has its own PluginContext (the plugin ctx).

Review comment:
       The `For example` in the next line belongs to this item.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org