mirror of
https://github.com/bytecodealliance/wasm-micro-runtime.git
synced 2026-04-19 02:28:43 +00:00
* refactor(ci): production-ready SGX install script with logging and idempotency - Add comprehensive logging infrastructure to /tmp/install_sgx.log - Implement idempotency checks for SGX packages and SDK - Modularize into functions: platform_detect, install_packages, validate_installation, cleanup - Add strict error handling with set -euo pipefail and error traps - Replace FIXME with proper environment sourcing documentation - Add dynamic platform detection for Ubuntu 20+/Debian 11/12 - Ensure minimal console output (final status only) with all details in log - Verify all acceptance scenarios pass with comprehensive testing * Refactoring enclave-sample aligning sgx BKM. - Buffer interface redesign to separate input and output - prevent untrusted pointer - add module and instance handle release functions for better resource management
36 lines
1.0 KiB
Plaintext
36 lines
1.0 KiB
Plaintext
/*
|
|
* Copyright (C) 2019 Intel Corporation. All rights reserved.
|
|
* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
*/
|
|
|
|
#define WASM_ENABLE_SGX_IPFS 0
|
|
#define WASM_ENABLE_LIB_RATS 0
|
|
|
|
enclave {
|
|
from "sgx_tstdc.edl" import *;
|
|
from "sgx_pthread.edl" import *;
|
|
from "sgx_wamr.edl" import *;
|
|
#if WASM_ENABLE_LIB_RATS != 0
|
|
from "rats.edl" import *;
|
|
from "sgx_tsgxssl.edl" import *;
|
|
#endif
|
|
#if WASM_ENABLE_SGX_IPFS != 0
|
|
from "sgx_tprotected_fs.edl" import *;
|
|
#endif
|
|
|
|
//TODO: replace void with an int as error code
|
|
trusted {
|
|
/* define ECALLs here. */
|
|
public void ecall_handle_command(unsigned cmd,
|
|
[in, out, size=cmd_buf_size]uint8_t *cmd_buf,
|
|
unsigned cmd_buf_size);
|
|
public void ecall_iwasm_main([user_check]uint8_t *wasm_file_buf,
|
|
uint32_t wasm_file_size);
|
|
};
|
|
|
|
untrusted {
|
|
/* define OCALLs here. */
|
|
int ocall_print([in, string]const char* str);
|
|
};
|
|
};
|