feat: lifetime elision, tooling CI, registry, and LSP locals

Ship the QUALITY_PLAN stretch from ownership through ecosystem: C.1
lifetime elision (bootstrap + selfhost), bux fmt/test/doc CI hooks,
stdlib goldens, package registry (bux search/add), and LSP 0.4
position-sensitive locals with inferred let types. Full-tree format
pass plus Map/Set remove double-free fix.
This commit is contained in:
2026-07-19 16:35:08 +03:00
parent 3eb1ad3a82
commit 53b43b0f79
130 changed files with 20494 additions and 16738 deletions
+50 -50
View File
@@ -1,62 +1,62 @@
module Std::Net {
extern func bux_socket_create() -> int;
extern func bux_socket_reuse(fd: int) -> int;
extern func bux_socket_bind(fd: int, addr: String, port: int) -> int;
extern func bux_socket_listen(fd: int, backlog: int) -> int;
extern func bux_socket_accept(fd: int) -> int;
extern func bux_socket_connect(fd: int, addr: String, port: int) -> int;
extern func bux_socket_send(fd: int, data: String, len: int) -> int;
extern func bux_socket_recv(fd: int, maxLen: int) -> String;
extern func bux_socket_close(fd: int) -> int;
extern func bux_socket_error() -> String;
extern func bux_socket_create() -> int;
extern func bux_socket_reuse(fd: int) -> int;
extern func bux_socket_bind(fd: int, addr: String, port: int) -> int;
extern func bux_socket_listen(fd: int, backlog: int) -> int;
extern func bux_socket_accept(fd: int) -> int;
extern func bux_socket_connect(fd: int, addr: String, port: int) -> int;
extern func bux_socket_send(fd: int, data: String, len: int) -> int;
extern func bux_socket_recv(fd: int, maxLen: int) -> String;
extern func bux_socket_close(fd: int) -> int;
extern func bux_socket_error() -> String;
/* Create a TCP socket. Returns -1 on error. */
func Net_Create() -> int {
return bux_socket_create();
}
/* Create a TCP socket. Returns -1 on error. */
func Net_Create() -> int {
return bux_socket_create();
}
/* Enable SO_REUSEADDR on a socket. */
func Net_SetReuse(fd: int) -> bool {
return bux_socket_reuse(fd) == 0;
}
/* Enable SO_REUSEADDR on a socket. */
func Net_SetReuse(fd: int) -> bool {
return bux_socket_reuse(fd) == 0;
}
/* Bind a socket to an address and port. */
func Net_Bind(fd: int, addr: String, port: int) -> bool {
return bux_socket_bind(fd, addr, port) == 0;
}
/* Bind a socket to an address and port. */
func Net_Bind(fd: int, addr: String, port: int) -> bool {
return bux_socket_bind(fd, addr, port) == 0;
}
/* Start listening for connections. */
func Net_Listen(fd: int, backlog: int) -> bool {
return bux_socket_listen(fd, backlog) == 0;
}
/* Start listening for connections. */
func Net_Listen(fd: int, backlog: int) -> bool {
return bux_socket_listen(fd, backlog) == 0;
}
/* Accept a connection. Returns new fd or -1 on error. */
func Net_Accept(fd: int) -> int {
return bux_socket_accept(fd);
}
/* Accept a connection. Returns new fd or -1 on error. */
func Net_Accept(fd: int) -> int {
return bux_socket_accept(fd);
}
/* Connect to a remote address and port. */
func Net_Connect(fd: int, addr: String, port: int) -> bool {
return bux_socket_connect(fd, addr, port) == 0;
}
/* Connect to a remote address and port. */
func Net_Connect(fd: int, addr: String, port: int) -> bool {
return bux_socket_connect(fd, addr, port) == 0;
}
/* Send data. Returns bytes sent or -1 on error. */
func Net_Send(fd: int, data: String) -> int {
return bux_socket_send(fd, data, bux_strlen(data) as int);
}
/* Send data. Returns bytes sent or -1 on error. */
func Net_Send(fd: int, data: String) -> int {
return bux_socket_send(fd, data, bux_strlen(data) as int);
}
/* Receive up to maxLen bytes. Returns empty string on error/EOF. */
func Net_Recv(fd: int, maxLen: int) -> String {
return bux_socket_recv(fd, maxLen);
}
/* Receive up to maxLen bytes. Returns empty string on error/EOF. */
func Net_Recv(fd: int, maxLen: int) -> String {
return bux_socket_recv(fd, maxLen);
}
/* Close a socket. */
func Net_Close(fd: int) -> bool {
return bux_socket_close(fd) == 0;
}
/* Close a socket. */
func Net_Close(fd: int) -> bool {
return bux_socket_close(fd) == 0;
}
/* Get last socket error as a string. */
func Net_LastError() -> String {
return bux_socket_error();
}
/* Get last socket error as a string. */
func Net_LastError() -> String {
return bux_socket_error();
}
}