This is an automated email from the ASF dual-hosted git repository.

zfc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-teaclave-website.git

commit db06fa8c6072c4ab5895b24e2426f29316b34c09
Author: Zhaofeng Chen <[email protected]>
AuthorDate: Thu Jul 17 12:32:53 2025 +0000

    api-doc: add tz-sdk api doc
    api-doc: rm teaclave legacy doc
---
 Dockerfile                 | 50 ++++++++++++----------------------------------
 site/Makefile              | 21 +++++--------------
 site/docusaurus.config.js  |  4 ----
 tz-sdk-api-docs/Cargo.toml | 12 +++++++++++
 tz-sdk-api-docs/lib.rs     |  1 +
 5 files changed, 31 insertions(+), 57 deletions(-)

diff --git a/Dockerfile b/Dockerfile
index 4ab087ecf..e46db14fe 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -6,44 +6,20 @@ RUN . "$HOME/.cargo/env" && cd sgx-sdk-api-docs && cargo doc
 RUN mkdir -p /prebuilt_docs && \
     cp -r sgx-sdk-api-docs/target/doc /prebuilt_docs/sgx-sdk-docs
 
-# TODO: Add Trustzone Docs stage
-
-# Teaclave Docs stage
-FROM teaclave/teaclave-build-ubuntu-2004-sgx-2.17.1:0.2.0 AS teaclave-docs
+# Trustzone Docs stage
+FROM teaclave/teaclave-trustzone-emulator-std-optee-4.5.0-expand-memory:latest 
AS tz-docs
 WORKDIR /app
+COPY tz-sdk-api-docs /app/tz-sdk-api-docs
+RUN . /opt/teaclave/setup/bootstrap_env && \
+    . /opt/teaclave/environment && \
+    . $HOME/.cargo/env && \
+    cd tz-sdk-api-docs && cargo doc
+RUN mkdir -p /prebuilt_docs && \
+    cp -r tz-sdk-api-docs/target/doc /prebuilt_docs/tz-sdk-docs
 
-# Prepare Teaclave Repo
-RUN git clone https://github.com/apache/incubator-teaclave.git teaclave 
--depth 1 
-RUN cd teaclave && git submodule update --init --depth 1 
-
-# Build Python SDK docs
-RUN pip3 install grpcio-tools grpclib pdoc
-RUN python3 -m grpc_tools.protoc \
-    --proto_path=teaclave/services/proto/src/proto \
-    --python_out=teaclave/sdk/python \
-    --grpclib_python_out=teaclave/sdk/python \
-    teaclave/services/proto/src/proto/*.proto
-RUN PYTHONPATH=teaclave/sdk/python pdoc teaclave/sdk/python/teaclave.py -o 
/tmp/client-sdk-python-docs
-
-# Build Teaclave docs
-RUN . /opt/sgxsdk/environment && \
-    . /root/.cargo/env && \
-    cd teaclave && \
-    mkdir build && \
-    cd build && \
-    cmake .. && \
-    make doc -j$(nproc)
-
-# Copy all docs to prebuilt directory
-RUN mkdir -p /prebuilt_docs/teaclave-docs && \
-    cp -r /tmp/client-sdk-python-docs 
/prebuilt_docs/teaclave-docs/client-sdk-python && \
-    cd teaclave/release/ && \
-    cp -r ./docs/enclave /prebuilt_docs/teaclave-docs/enclave && \
-    cp -r ./docs/app /prebuilt_docs/teaclave-docs/app && \
-    cp -r ./docs/unix /prebuilt_docs/teaclave-docs/client-sdk-rust 
-
-# clean up
-RUN rm -rf teaclave/build
+# Teaclave Docs stage
+#FROM teaclave/teaclave-build-ubuntu-2004-sgx-2.17.1:0.2.0 AS teaclave-docs
+#WORKDIR /app
 
 # Dependencies stage
 FROM node:22-slim AS deps
@@ -56,7 +32,7 @@ FROM node:22-slim as teaclave-docs-site
 
 COPY --from=deps /app/node_modules /app/node_modules
 COPY --from=sgx-docs /prebuilt_docs/sgx-sdk-docs /prebuilt_docs/sgx-sdk-docs
-COPY --from=teaclave-docs /prebuilt_docs/teaclave-docs 
/prebuilt_docs/teaclave-docs
+COPY --from=tz-docs /prebuilt_docs/tz-sdk-docs /prebuilt_docs/tz-sdk-docs
 
 ENV PATH="/root/.cargo/bin:${PATH}"
 ENV PYTHONPATH="/usr/local/lib/python3.9/dist-packages:${PYTHONPATH}"
diff --git a/site/Makefile b/site/Makefile
index 027f02605..6a902684d 100644
--- a/site/Makefile
+++ b/site/Makefile
@@ -29,21 +29,9 @@ sgx-sdk-api-docs: site-build
        @echo "<meta http-equiv=refresh content=0;url=`echo sgx_tstd | cut -d 
'/' -f 2`/index.html>" > build/api-docs/sgx-sdk/index.html
 
 trustzone-sdk-api-docs: site-build
-       @echo "Trustzone SDK API docs not supported yet"
-
-client-sdk-python-docs: site-build
-       cp -r /prebuilt_docs/teaclave-docs/client-sdk-python 
build/api-docs/client-sdk-python
-       @echo "<meta http-equiv=refresh content=0;url=python/teaclave.html>" > 
build/api-docs/client-sdk-python/index.html
-
-client-sdk-rust-docs: site-build
-       cp -r /prebuilt_docs/teaclave-docs/client-sdk-rust 
build/api-docs/client-sdk-rust
-       @echo "<meta http-equiv=refresh content=0;url=`echo teaclave_client_sdk 
| cut -d '/' -f 2`/index.html>" > build/api-docs/client-sdk-rust/index.html
-
-teaclave-crates-docs: site-build
-       cp -r /prebuilt_docs/teaclave-docs/enclave 
build/api-docs/crates-enclave 
-       cp -r /prebuilt_docs/teaclave-docs/app build/api-docs/crates-app
-
-teaclave-docs: teaclave-crates-docs client-sdk-python-docs client-sdk-rust-docs
+       mkdir -p build/api-docs/trustzone-sdk/
+       cp -r /prebuilt_docs/tz-sdk-docs/* build/api-docs/trustzone-sdk/
+       @echo "<meta http-equiv=refresh content=0;url=`echo optee_teec | cut -d 
'/' -f 2`/index.html>" > build/api-docs/trustzone-sdk/index.html
 
 site-build: update-repo
        npm run build
@@ -55,8 +43,9 @@ dev:
 preview:
        cd build && python3 -m http.server
 
-build: teaclave-docs sgx-sdk-api-docs trustzone-sdk-api-docs 
+build: sgx-sdk-api-docs trustzone-sdk-api-docs 
        cp ../.asf.yaml build
+       find build -name '*.lock' -exec chmod 655 {} \;
 
 clean-repo:
        rm -rf docs/teaclave
diff --git a/site/docusaurus.config.js b/site/docusaurus.config.js
index 803c53ed0..2d4d57eb6 100644
--- a/site/docusaurus.config.js
+++ b/site/docusaurus.config.js
@@ -150,13 +150,9 @@ const config = {
               { label: 'Teaclave', to: '/docs/' },
               { label: 'Teaclave SGX SDK', to: '/sgx-sdk-docs/' },
               { label: 'Teaclave TrustZone SDK', to: '/trustzone-sdk-docs/' },
-              { label: 'Teaclave Client SDK (Rust)', href: 
'https://teaclave.apache.org/api-docs/client-sdk-rust/', target: '_self', rel: 
'' },
-              { label: 'Teaclave Client SDK (Python)', href: 
'https://teaclave.apache.org/api-docs/client-sdk-python/', target: '_self', 
rel: '' },
               { label: 'Teaclave SGX SDK', href: 
'https://teaclave.apache.org/api-docs/sgx-sdk/', target: '_self', rel: '' },
               { label: 'Teaclave TrustZone SDK (Host)', href: 
'https://teaclave.apache.org/api-docs/trustzone-sdk/optee-teec', target: 
'_self', rel: '' },
               { label: 'Teaclave TrustZone SDK (TA)', href: 
'https://teaclave.apache.org/api-docs/trustzone-sdk/optee-utee', target: 
'_self', rel: '' },
-              { label: 'Crates in Teaclave (Enclave)', href: 
'https://teaclave.apache.org/api-docs/crates-enclave/', target: '_self', rel: 
'' },
-              { label: 'Crates in Teaclave (App)', href: 
'https://teaclave.apache.org/api-docs/crates-app/', target: '_self', rel: '' },
             ],
             position: 'right',
           },
diff --git a/tz-sdk-api-docs/Cargo.toml b/tz-sdk-api-docs/Cargo.toml
new file mode 100644
index 000000000..189af8ca2
--- /dev/null
+++ b/tz-sdk-api-docs/Cargo.toml
@@ -0,0 +1,12 @@
+[package]
+name = "teaclave-tz-sdk-docs"
+version = "0.1.0"
+authors = ["Teaclave Contributors <[email protected]>"]
+edition = "2021"
+
+[lib]
+path = "lib.rs"
+
+[dependencies]
+optee-teec = { git = 
"https://github.com/apache/incubator-teaclave-trustzone-sdk.git";, branch = 
"main" }
+optee-utee = { git = 
"https://github.com/apache/incubator-teaclave-trustzone-sdk.git";, branch = 
"main" }
diff --git a/tz-sdk-api-docs/lib.rs b/tz-sdk-api-docs/lib.rs
new file mode 100644
index 000000000..55f4dd324
--- /dev/null
+++ b/tz-sdk-api-docs/lib.rs
@@ -0,0 +1 @@
+use optee_teec;


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to