Commit Graph

12 Commits

Author SHA1 Message Date
liang.he
159b69da38
Update cmake min to 3.14 ()
3.14 is used and tested by linux mini-product

to fix

```
CMake Error at CMakeLists.txt:4 (cmake_minimum_required):
  Compatibility with CMake < 3.5 has been removed from CMake.

  Update the VERSION argument <min> value.  Or, use the <min>...<max> syntax
  to tell CMake that the project requires at least <min> but has been updated
  to work with policies introduced by <max> or earlier.

  Or, add -DCMAKE_POLICY_VERSION_MINIMUM=3.5 to try configuring anyway.
```
2025-04-02 07:13:53 +08:00
Huang Qi
412631ac13
fix: correct typos and improve comments across multiple files by codespell ()
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2025-03-07 08:21:54 +08:00
Wenyong Huang
289fc5efbf
Enhance/Fix sample socket-api and workload ()
- Add python script to test socket-api cases
- Fix issues in socket-api send_recv wasm app
- Fix issues in building samples/workload/meshoptimizer
- Enhance build script of sample workload
2023-03-08 16:36:08 +08:00
Wenyong Huang
1be202fad8
Fix several issues found ()
- CMakeLists.txt: add lib_export.h to install list
- Fast JIT: enlarge spill cache size to enable several standalone cases
                when hw bound check is disabled
- Thread manager: wasm_cluster_exit_thread may destroy an invalid
               exec_env->module_inst when exec_env was destroyed before
- samples/socket-api: fix failure to run timeout_client.wasm
- enhance CI build wasi-libc and sample/wasm-c-api-imports CMakeLlist.txt
2023-03-03 15:00:54 +08:00
Wenyong Huang
ace05b182d
Fix possible non null-terminated string issue in socket sample () 2022-10-17 22:45:10 +08:00
Callum Macmillan
5ddc335a7f
Add timeout send/recv and multicast client/server socket examples ()
Add a couple of socket examples that can be used with WAMR:
- The `timeout_client` and `timeout_server` examples demonstrate socket
  send and receive timeouts using the socket options
- The `multicast_client` and `multicast_server` examples demonstrate receiving
  multicast packets in WASM

And add several macro controls for `socket_opts` example.
2022-10-07 10:31:21 +08:00
liang.he
1effda4cb5
Fix isssues detected by coverity ()
Add return value checks
Append string terminator
2022-09-29 13:28:18 +08:00
Wenyong Huang
78b5c5b484
Merge dev/socket into main ()
Implement more socket APIs, refer to  and below PRs:
- Implement wasi_addr_resolve function ()
- Fix socket-api byte order issue when host/network order are the same ()
- Enhance sock_addr_local syscall ()
- Implement sock_addr_remote syscall ()
- Add support for IPv6 in WAMR ()
- Implement ns lookup allowlist ()
- Implement sock_send_to and sock_recv_from system calls ()
- Added http downloader and multicast socket options ()
- Fix `bind()` calls to receive the correct size of `sockaddr` structure ()
- Assert on correct parameters ()
- Copy only received bytes from socket recv buffer into the app buffer ()

Co-authored-by: Marcin Kolny <mkolny@amazon.com>
Co-authored-by: Marcin Kolny <marcin.kolny@gmail.com>
Co-authored-by: Callum Macmillan <callumimacmillan@gmail.com>
2022-09-22 21:46:14 +08:00
Wenyong Huang
a517bb249a
Fix socket sample issue reported by coverity () 2022-08-19 18:06:26 +08:00
liang.he
ceaf7dc660
Fix invalid calculation of total size of bytes to send and recv ()
The total size of bytes to send and recv should be set to 0 before calculation,
but not including the size of iovec_app_t structure.
2022-05-10 10:43:34 +08:00
liang.he
559a0502f1
Enable socket-api recvmsg() and sendmsg() ()
Implement socket-api `recvmsg()` and `sendmsg()` for wasm app,
add sample and update document.
2022-03-30 15:57:40 +08:00
Wenyong Huang
9c87a1ee17
Implement part of Berkeley Socket API for libc-wasi ()
Refer to [Networking API design](https://github.com/WebAssembly/WASI/issues/370)
and [feat(socket): berkeley socket API v2](https://github.com/WebAssembly/WASI/pull/459):

- Support the socket API of synchronous mode, including `socket/bind/listen/accept/send/recv/close/shutdown`,
    the asynchronous mode isn't supported yet.
- Support adding `--addr-pool=<pool1,pool2,..>` argument for command line to identify the valid ip address range
- Add socket-api sample and update the document
2022-03-10 15:13:38 +08:00