File tree Expand file tree Collapse file tree 3 files changed +31
-1
lines changed
Expand file tree Collapse file tree 3 files changed +31
-1
lines changed Original file line number Diff line number Diff line change @@ -50,6 +50,23 @@ WASI_DECLARE_OWN(config)
5050 */
5151WASI_API_EXTERN own wasi_config_t * wasi_config_new ();
5252
53+ /**
54+ * \brief Allow all network addresses accessible to the host.
55+ *
56+ * This method will inherit all network addresses meaning that any address
57+ * can be bound by the guest or connected to by the guest using any
58+ * protocol.
59+ */
60+ WASI_API_EXTERN void wasi_config_inherit_network (wasi_config_t * config );
61+
62+ /**
63+ * \brief Allow usage of `wasi:sockets/ip-name-lookup`
64+ *
65+ * By default this is disabled.
66+ */
67+ WASI_API_EXTERN void wasi_config_allow_ip_name_lookup (wasi_config_t * config ,
68+ bool enable );
69+
5370/**
5471 * \brief Sets the argv list for this configuration object.
5572 *
Original file line number Diff line number Diff line change @@ -50,6 +50,19 @@ pub extern "C" fn wasi_config_new() -> Box<wasi_config_t> {
5050 } )
5151}
5252
53+ #[ unsafe( no_mangle) ]
54+ pub unsafe extern "C" fn wasi_config_inherit_network ( config : & mut wasi_config_t ) {
55+ config. builder . inherit_network ( ) ;
56+ }
57+
58+ #[ unsafe( no_mangle) ]
59+ pub unsafe extern "C" fn wasi_config_allow_ip_name_lookup (
60+ config : & mut wasi_config_t ,
61+ enable : bool ,
62+ ) {
63+ config. builder . allow_ip_name_lookup ( enable) ;
64+ }
65+
5366#[ unsafe( no_mangle) ]
5467pub unsafe extern "C" fn wasi_config_set_argv (
5568 config : & mut wasi_config_t ,
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ __declspec(dllexport)
1717// `asm` statement.
1818__attribute__((weak , noinline ))
1919#endif
20- void __jit_debug_register_code () {
20+ void __jit_debug_register_code () {
2121#ifndef CFG_TARGET_OS_windows
2222 __asm__("" );
2323#endif
You can’t perform that action at this time.
0 commit comments