diff --git a/docs/develop/python/_category_.json b/docs/develop/python/_category_.json deleted file mode 100644 index bce8d88b..00000000 --- a/docs/develop/python/_category_.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "label": "Develop WASM Apps in Python", - "position": 6, - "link": { - "type": "generated-index", - "description": "In this chapter, we will learn how to create WASM apps in Python." - } -} diff --git a/docs/develop/python/hello_world.md b/docs/develop/python/hello_world.md deleted file mode 100644 index 4c8835f4..00000000 --- a/docs/develop/python/hello_world.md +++ /dev/null @@ -1,49 +0,0 @@ ---- -sidebar_position: 1 ---- - -# Python - -Several different language implementations of the Python runtime exist, and some of them support WebAssembly. This document will describe how to run [RustPython](https://github.com/RustPython/RustPython) on WasmEdge to execute Python programs. - -## Compile RustPython - -To compile RustPython, you should install the Rust toolchain on your machine. And `wasm32-wasip1` platform support should be enabled. - -```bash -rustup target add wasm32-wasip1 -``` - -Then you could use the following command to clone and compile RustPython: - -```bash -git clone https://github.com/RustPython/RustPython.git -cd RustPython -cargo build --release --target wasm32-wasip1 --features="freeze-stdlib" -``` - -`freeze-stdlib` feature is enabled for including Python standard library inside the binary file. The output file should be at `target/wasm32-wasip1/release/rustpython.wasm`. - -## AOT Compile - -WasmEdge supports compiling WebAssembly bytecode programs into native machine code for better performance. It is highly recommended to compile the RustPython to native machine code before running. - -```bash -wasmedge compile ./target/wasm32-wasip1/release/rustpython.wasm ./target/wasm32-wasip1/release/rustpython.wasm -``` - -## Run - -```bash -wasmedge ./target/wasm32-wasip1/release/rustpython.wasm -``` - -Then you could get a Python shell in WebAssembly! - -## Grant file system access - -You can pre-open directories to let WASI programs have permission to read and write files stored on the real machine. The following command mounted the current working directory to the WASI virtual file system. - -```bash -wasmedge --dir .:. ./target/wasm32-wasip1/release/rustpython.wasm -``` diff --git a/i18n/zh/docusaurus-plugin-content-docs/current.json b/i18n/zh/docusaurus-plugin-content-docs/current.json index 4ce26f76..2b827d03 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current.json +++ b/i18n/zh/docusaurus-plugin-content-docs/current.json @@ -171,14 +171,6 @@ "message": "In this chapter, we will learn how to Embed WasmEdge in your Go host applications.", "description": "The generated-index page description for category Go SDK for Embedding Wasm Functions in sidebar embedSidebar" }, - "sidebar.embedSidebar.category.Java SDK for Embedding Wasm Functions": { - "message": "Java SDK for Embedding Wasm Functions", - "description": "The label for category Java SDK for Embedding Wasm Functions in sidebar embedSidebar" - }, - "sidebar.embedSidebar.category.Java SDK for Embedding Wasm Functions.link.generated-index.description": { - "message": "In this chapter, we will learn how to Embed WasmEdge in your Java host applications.", - "description": "The generated-index page description for category Java SDK for Embedding Wasm Functions in sidebar embedSidebar" - }, "sidebar.embedSidebar.category.C++ SDK for Embedding Wasm Functions": { "message": "C++ SDK for Embedding Wasm Functions", "description": "The label for category C++ SDK for Embedding Wasm Functions in sidebar embedSidebar" @@ -187,14 +179,6 @@ "message": "In this chapter, we will learn how to Embed WasmEdge in your C++ host applications.", "description": "The generated-index page description for category C++ SDK for Embedding Wasm Functions in sidebar embedSidebar" }, - "sidebar.embedSidebar.category.Python SDK for Embedding Wasm Functions": { - "message": "Python SDK for Embedding Wasm Functions", - "description": "The label for category Python SDK for Embedding Wasm Functions in sidebar embedSidebar" - }, - "sidebar.embedSidebar.category.Python SDK for Embedding Wasm Functions.link.generated-index.description": { - "message": "In this chapter, we will learn how to Embed WasmEdge in your Python host applications.", - "description": "The generated-index page description for category Python SDK for Embedding Wasm Functions in sidebar embedSidebar" - }, "sidebar.embedSidebar.category.WasmEdge Use Cases": { "message": "WasmEdge Use Cases", "description": "The label for category WasmEdge Use Cases in sidebar embedSidebar" diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/develop/python/_category_.json b/i18n/zh/docusaurus-plugin-content-docs/current/develop/python/_category_.json deleted file mode 100644 index bce8d88b..00000000 --- a/i18n/zh/docusaurus-plugin-content-docs/current/develop/python/_category_.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "label": "Develop WASM Apps in Python", - "position": 6, - "link": { - "type": "generated-index", - "description": "In this chapter, we will learn how to create WASM apps in Python." - } -} diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/develop/python/hello_world.md b/i18n/zh/docusaurus-plugin-content-docs/current/develop/python/hello_world.md deleted file mode 100644 index 4c8835f4..00000000 --- a/i18n/zh/docusaurus-plugin-content-docs/current/develop/python/hello_world.md +++ /dev/null @@ -1,49 +0,0 @@ ---- -sidebar_position: 1 ---- - -# Python - -Several different language implementations of the Python runtime exist, and some of them support WebAssembly. This document will describe how to run [RustPython](https://github.com/RustPython/RustPython) on WasmEdge to execute Python programs. - -## Compile RustPython - -To compile RustPython, you should install the Rust toolchain on your machine. And `wasm32-wasip1` platform support should be enabled. - -```bash -rustup target add wasm32-wasip1 -``` - -Then you could use the following command to clone and compile RustPython: - -```bash -git clone https://github.com/RustPython/RustPython.git -cd RustPython -cargo build --release --target wasm32-wasip1 --features="freeze-stdlib" -``` - -`freeze-stdlib` feature is enabled for including Python standard library inside the binary file. The output file should be at `target/wasm32-wasip1/release/rustpython.wasm`. - -## AOT Compile - -WasmEdge supports compiling WebAssembly bytecode programs into native machine code for better performance. It is highly recommended to compile the RustPython to native machine code before running. - -```bash -wasmedge compile ./target/wasm32-wasip1/release/rustpython.wasm ./target/wasm32-wasip1/release/rustpython.wasm -``` - -## Run - -```bash -wasmedge ./target/wasm32-wasip1/release/rustpython.wasm -``` - -Then you could get a Python shell in WebAssembly! - -## Grant file system access - -You can pre-open directories to let WASI programs have permission to read and write files stored on the real machine. The following command mounted the current working directory to the WASI virtual file system. - -```bash -wasmedge --dir .:. ./target/wasm32-wasip1/release/rustpython.wasm -``` diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/embed/java/_category_.json b/i18n/zh/docusaurus-plugin-content-docs/current/embed/java/_category_.json deleted file mode 100644 index 6bd0f5e6..00000000 --- a/i18n/zh/docusaurus-plugin-content-docs/current/embed/java/_category_.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "label": "Java SDK for Embedding WasmEdge", - "position": 7, - "link": { - "type": "generated-index", - "description": "In this chapter, we will learn how to Embed WasmEdge in your Java host applications." - } -} diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/embed/java/intro.md b/i18n/zh/docusaurus-plugin-content-docs/current/embed/java/intro.md deleted file mode 100644 index 774c9e4b..00000000 --- a/i18n/zh/docusaurus-plugin-content-docs/current/embed/java/intro.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -sidebar_position: 1 ---- - -# WasmEdge Java SDK Introduction - - -:::info -Work in Progress -::: diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/embed/python/_category_.json b/i18n/zh/docusaurus-plugin-content-docs/current/embed/python/_category_.json deleted file mode 100644 index 5c37d5eb..00000000 --- a/i18n/zh/docusaurus-plugin-content-docs/current/embed/python/_category_.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "label": "Python SDK for Embedding WasmEdge", - "position": 10, - "link": { - "type": "generated-index", - "description": "In this chapter, we will learn how to Embed WasmEdge in your Python host applications." - } -} diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/embed/python/intro.md b/i18n/zh/docusaurus-plugin-content-docs/current/embed/python/intro.md deleted file mode 100644 index 2ae440c3..00000000 --- a/i18n/zh/docusaurus-plugin-content-docs/current/embed/python/intro.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -sidebar_position: 1 ---- - -# WasmEdge Python SDK Introduction - - -:::info -Work in Progress -:::