Skip to content

Conversation

@JamesMenetrey
Copy link
Contributor

Dear project owners and developers,

I would like to follow up on your recent great work regarding the support of the Berkeley Socket API support in Wasm (POSIX and Windows) by providing an implementation for Intel SGX enclaves.

In my view, the proposed changes extend naturally the work you have done. To be comprehensive, here is a complete list of the enhancement of this pull request:

  • bring Berkeley socket API in Intel SGX enclaves,
  • adapt the documentation of the socket API to mention Intel SGX enclaves,
  • adapt iwasm in the mini-product linux-sgx to support the same option as the one for linux,
  • tested on the socket sample as provided by WAMR (the TCP client/server).

I always strive to follow the coding guidelines, advice/feedback and perform any required code changes that would better suit your conventions. Don't hesitate to code review and ask for changes.

Cheers,
Jämes

@wenyongh
Copy link
Collaborator

Dear project owners and developers,

I would like to follow up on your recent great work regarding the support of the Berkeley Socket API support in Wasm (POSIX and Windows) by providing an implementation for Intel SGX enclaves.

In my view, the proposed changes extend naturally the work you have done. To be comprehensive, here is a complete list of the enhancement of this pull request:

  • bring Berkeley socket API in Intel SGX enclaves,
  • adapt the documentation of the socket API to mention Intel SGX enclaves,
  • adapt iwasm in the mini-product linux-sgx to support the same option as the one for linux,
  • tested on the socket sample as provided by WAMR (the TCP client/server).

I always strive to follow the coding guidelines, advice/feedback and perform any required code changes that would better suit your conventions. Don't hesitate to code review and ask for changes.

Cheers, Jämes

@JamesMenetrey, thanks for submitting the PR, it is really cool!

For the coding guidelines, please refer to https://github.com/bytecodealliance/wasm-micro-runtime/blob/main/ci/coding_guidelines_check.py#L103-L113

Normally after coding and before submitting the PR, we can use clang-format-12 to format all the source files:

clang-format-12 -i --style=file `find core/iwasm -name "*.h"`
clang-format-12 -i --style=file `find core/iwasm -name "*.c"`

@JamesMenetrey
Copy link
Contributor Author

Hey @wenyongh, thanks for your feedback! I could successfully run clang-format on the source and header files.

I also provided a change based on your review, where I have removed the annotation out in the EDL for the socket structure in the POSIX functions accept and connect since they do not alter it.

@wenyongh wenyongh merged commit 106974d into bytecodealliance:main Mar 25, 2022
vickiegpt pushed a commit to vickiegpt/wamr-aot-gc-checkpoint-restore that referenced this pull request May 27, 2024
Implement Berkeley Socket API for Intel SGX
- bring Berkeley socket API in Intel SGX enclaves,
- adapt the documentation of the socket API to mention Intel SGX enclaves,
- adapt _iwasm_ in the mini-product _linux-sgx_ to support the same option as the one for _linux_,
- tested on the socket sample as provided by WAMR (the TCP client/server).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants