Thanks for asking this question. First of all, did you evaluate the binary size with the release build? If not, you can add this flag for cmake `-DCMAKE_BUILD_TYPE=Release`.
This is what I got for the release build (without stripping): ``` $ find . -name "*.so" | xargs ls -lh -rwxr-xr-x 1 user group 9.0M Dec 1 21:13 ./lib/libteaclave_client_sdk.so -rw-r--r-- 1 user group 22M Dec 1 21:08 ./services/teaclave_access_control_service_enclave.signed.so -rw-r--r-- 1 user group 7.4M Dec 1 21:07 ./services/teaclave_authentication_service_enclave.signed.so -rw-r--r-- 1 user group 26M Dec 1 21:06 ./services/teaclave_execution_service_enclave.signed.so -rw-r--r-- 1 user group 8.1M Dec 1 21:08 ./services/teaclave_frontend_service_enclave.signed.so -rw-r--r-- 1 user group 8.3M Dec 1 21:10 ./services/teaclave_management_service_enclave.signed.so -rw-r--r-- 1 user group 8.0M Dec 1 21:10 ./services/teaclave_scheduler_service_enclave.signed.so -rw-r--r-- 1 user group 7.1M Dec 1 21:07 ./services/teaclave_storage_service_enclave.signed.so -rw-r--r-- 1 user group 8.1M Dec 1 21:04 ./tests/teaclave_functional_tests_enclave.signed.so -rw-r--r-- 1 user group 25M Dec 1 21:09 ./tests/teaclave_integration_tests_enclave.signed.so -rw-r--r-- 1 user group 28M Dec 1 21:05 ./tests/teaclave_unit_tests_enclave.signed.so -rw-r--r-- 1 user group 5.7M Dec 1 21:07 ./tool/teaclave_sgx_tool_enclave.signed.so ``` Q1: Can the enclave work after strip ? Is signature info lost? Stripping will affect information for panic with backtrace. Therefore, it's safe to strip the binary. Q2: Is wasm file size optimized? I don't understand this question. Did you mean WAMR? Q3: dup link so I believe linker only links objects which are used. For example, WAMR is not used in the management service, `vmlib` is not linked into the library. Q4: In teaclave runtime, effect of dynamic link equal to static link, is it true? For SGX enclave, all code are statically linked. Compared with C, Rust's program is larger mainly due to these two reasons: - Rust's standard library - Lots of generics in Rust's program For our services, the two main libraries are vmlib (WAMR) used in the execution service and pypy-c (MesaPy) used in access_control service and execution service. Please let me if you have more questions. Thanks. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/apache/incubator-teaclave/issues/581#issuecomment-984310554