-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b7d96a7
commit e45b40d
Showing
13 changed files
with
110 additions
and
102 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,41 @@ | ||
import Github from '../components/github'; | ||
|
||
# Wasmo Overview | ||
|
||
This section provides detailed documentation for working with Wasmo. | ||
|
||
# Wasmo | ||
|
||
Wasmo is combined tool (Builder and CLI) for creating and building from scrach your WASM binaries with a simple Docker container. | ||
WebAssembly (WASM) is a simple machine model and executable format with an extensive specification. It is designed to be portable, compact, and execute at or near native speeds. | ||
|
||
|
||
Wasmo is strongly linked to [Extism](https://extism.org/) and all plugins built with Wasmo will be only executable with an Existm runtime. | ||
|
||
|
||
Our Wasmo documentation is broken down into app: | ||
<Github title="Wasmo Builder" href="https://github.com/MAIF/wasmo" /> | ||
*A tool for building WebAssembly binaries.* | ||
|
||
The builder is a tool for creating, editing and building your code to WASM binaries. | ||
It supports the creation and edition in a built-in UI. | ||
|
||
<Github title="Wasmo CLI" href="https://github.com/MAIF/wasmo/tree/main/cli" /> | ||
*A tool for creating and leading WebAssembly building.* | ||
|
||
|
||
The CLI is a tool to leading from your terminal the creation of WASM binaries. | ||
It comes with its own documentation, available in the [cli directory](https://github.com/MAIF/wasmo/tree/main/cli) of this project. | ||
<br /> | ||
## Articles : examples and enterprise use cases | ||
|
||
Wasmo plugins can be used : | ||
- With the reverse proxy [Otoroshi](https://www.otoroshi.io/) | ||
- [Wasm usage](https://maif.github.io/otoroshi/manual/how-to-s/wasm-usage.html) | ||
- [Wasmo and Otoroshi](https://maif.github.io/otoroshi/manual/how-to-s/wasmo-installation.html) | ||
- [Build plugins to manipulate http requests](https://zwiterrion.hashnode.dev/leveraging-wasm-for-api-gateway) | ||
|
||
- To build FAAS [Function As a Service](https://zwiterrion.hashnode.dev/building-your-first-faas-with-wasm) | ||
- To control [Feature flags](https://maif.github.io/izanami/docs/guides/local-scripts?_highlight=wasmo#creating-your-script-with-wasmo-cli) with [Izanami](https://maif.github.io/izanami/) | ||
|
||
<div className='flex gap-3'> | ||
<div className='flex-1'> | ||
<Github title="Wasmo Builder" href="https://github.com/MAIF/wasmo" /> | ||
<div style={{ minHeight: '4rem'}}> | ||
### A tool for building WebAssembly binaries | ||
</div> | ||
The builder is a tool for creating, editing and building your code to WASM binaries. | ||
It supports the creation and edition in a built-in UI. | ||
</div> | ||
|
||
<div className='flex-1'> | ||
<Github title="Wasmo CLI" href="https://github.com/MAIF/wasmo/tree/main/cli" /> | ||
<div style={{ minHeight: '4rem'}}> | ||
### A tool for creating and leading WebAssembly building | ||
</div> | ||
|
||
The CLI is a tool to leading from your terminal the creation of WASM binaries. | ||
It comes with its own documentation, available in the [cli directory](https://github.com/MAIF/wasmo/tree/main/cli) of this project. | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,38 @@ | ||
# Integration with Otoroshi | ||
|
||
We can connect Otoroshi with Wasmo. The only step is to navigate to the danger zone of your Otoroshi instance, | ||
and add the following values in the Wasmo section: | ||
Wasmo plugins can be used with [Otoroshi](https://www.otoroshi.io/) to build plugins to manipulate http requests. | ||
|
||
- `URL`: http://localhost:5001 | ||
- `Apikey id`: admin-api-apikey-id | ||
- `Apikey secret`: admin-api-apikey-secret | ||
- `User`: * | ||
- `Token secret`: | ||
[Click here](https://zwiterrion.hashnode.dev/leveraging-wasm-for-api-gateway) to read an article about Otoroshi and Wasmo. | ||
|
||
The User property is used by Wasmo to filter the list of returned plugins. For example, | ||
if the value of the property is `[email protected]`, Wasmo will return the list of Wasm plugins with the creator at `[email protected]`. | ||
## Bind Wasmo to Otoroshi | ||
|
||
Don’t forget to save the configuration. | ||
A convenient way to leverage Wasmo's plugins is by integrating Wasmo with Otoroshi. | ||
This enables manipulation of HTTP requests and responses within Otoroshi, facilitating the creation of mock API backends and addressing various other scenarios. | ||
|
||
We can connect Otoroshi with Wasmo. | ||
|
||
Steps are really straightforward : | ||
- navigate to the danger zone of your Otoroshi instance (create a new [Otoroshi instance](https://maif.github.io/otoroshi/manual/how-to-s/wasm-usage.html#before-your-start) if not already done) | ||
- connect Wasmo by specify the URL field where your Wasmo is deployed : http://localhost:5001 (following the Getting Started tutorial). | ||
- save the configuration | ||
|
||
Congratulations! You can now use your Wasmo plugins in the Otoroshi plugins : | ||
- [Wasm Pre-Route](https://maif.github.io/otoroshi/manual/plugins/built-in-plugins.html#otoroshi.next.plugins.WasmPreRoute) | ||
- [Wasm Request Transformer](https://maif.github.io/otoroshi/manual/plugins/built-in-plugins.html#otoroshi.next.plugins.WasmRequestTransformer) | ||
- [Wasm Response Transformer](https://maif.github.io/otoroshi/manual/plugins/built-in-plugins.html#otoroshi.next.plugins.WasmResponseTransformer) | ||
- [Wasm Route matcher](https://maif.github.io/otoroshi/manual/plugins/built-in-plugins.html#otoroshi.next.plugins.WasmRouteMatcher) | ||
- [Wasm Sink](https://maif.github.io/otoroshi/manual/plugins/built-in-plugins.html#otoroshi.next.plugins.WasmSink) | ||
- [Wasm Router](https://maif.github.io/otoroshi/manual/plugins/built-in-plugins.html#otoroshi.next.plugins.WasmRouter) | ||
- [Wasm Access Control](https://maif.github.io/otoroshi/manual/plugins/built-in-plugins.html#otoroshi.next.plugins.WasmAccessValidator) | ||
- [Wasm Backend](https://maif.github.io/otoroshi/manual/plugins/built-in-plugins.html#otoroshi.next.plugins.WasmBackend) | ||
|
||
|
||
## Expose Wasmo behind Otoroshi | ||
|
||
You can configure Wasmo to delegate its authentication to Otoroshi. You should use this configuration in a production environment. | ||
|
||
You can follow this [tutorial](https://maif.github.io/otoroshi/manual/how-to-s/wasmo-installation.html#create-a-route-to-expose-and-protect-wasmo-with-authentication) | ||
to deploy Otoroshi and Wasmo, both locally, and to secure access to Wasmo. | ||
|
||
To have more informations about Otoroshi and Wasmo, you can follow the two tutorials: | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters