use wasm_encoder::{Function, Instruction};
mod connect;
mod ids;
mod io;
mod lifecycle;
pub(in crate::codegen::wasm_gc) mod wireup;
pub(super) use connect::{
TcpConnectDns, TcpConnectHelperFns, TcpConnectIndices, TcpConnectMaterialize, TcpConnectPool,
TcpConnectSocket, emit_tcp_connect_stub,
};
pub(super) use ids::{emit_tcp_format_id, emit_tcp_parse_id};
pub(super) use io::{
TcpReadLineHelperFns, TcpReadLineIndices, TcpWriteLineHelperFns, TcpWriteLineIndices,
emit_tcp_read_line, emit_tcp_write_line,
};
pub(super) use lifecycle::{
TcpCloseHelperFns, TcpCloseIndices, TcpPingHelperFns, TcpPingIndices, TcpSendHelperFns,
TcpSendIndices, emit_tcp_close, emit_tcp_ping, emit_tcp_send,
};
pub(super) fn restore_bump(f: &mut Function, l_saved_alloc: u32, bump_alloc_ptr_global: u32) {
f.instruction(&Instruction::LocalGet(l_saved_alloc));
f.instruction(&Instruction::GlobalSet(bump_alloc_ptr_global));
}