dimgigov
fe31ddbc4b
feat: add Std::Crypto — SHA-256, HMAC-SHA256, Base64, random bytes
...
- C runtime (OpenSSL): bux_sha256, bux_hmac_sha256, bux_random_bytes,
bux_base64_encode, bux_base64_decode, bux_bytes_to_hex
- library/std/Crypto.bux: Crypto_Sha256, Crypto_HmacSha256,
Crypto_HmacSha256Raw, Crypto_RandomBytes, Crypto_Base64Encode,
Crypto_Base64Decode
- examples/jwt.bux: full JWT creation with HS256 signature
- Link with -lcrypto in C backend
2026-06-05 21:34:37 +03:00
dimgigov
49264b5d06
feat: add Std::Json — JSON parser and serializer
...
- JsonValue struct supporting null, bool, number, string, array, object
- Json_Parse(s: String) -> JsonValue: recursive descent parser
- Json_Stringify(v: JsonValue) -> String: recursive serializer
- Access helpers: Json_ObjectGet, Json_ObjectSet, Json_ObjectHas,
Json_ArrayGet, Json_ArrayPush, Json_ArrayLen, Json_ObjectLen
- Constructors: Json_Null, Json_Bool, Json_Number, Json_String,
Json_Array, Json_Object
- Type accessors: Json_IsNull, Json_AsBool, Json_AsNumber, Json_AsString
- examples/json.bux: demonstrates parse, access, build programmatically
- Add os_time, process, json to test-examples suite
2026-06-05 21:26:51 +03:00
dimgigov
db9025f3a3
feat: add Std::Fmt — string formatting module
...
- C runtime: bux_float_to_string() for float64 → String conversion
- String.bux: add String_FromFloat, extern decl for bux_float_to_string
- library/std/Fmt.bux: Fmt_Fmt1, Fmt_Fmt2, Fmt_Fmt3, Fmt_FmtInt, Fmt_FmtInt2,
Fmt_FmtFloat, Fmt_FmtBool — positional {0}, {1}, {2} placeholders
- Refactor examples to use Fmt:
factorial.bux, fibonacci.bux, process.bux, os_time.bux
2026-06-05 21:05:00 +03:00
dimgigov
ba9f5dfd05
feat: add Std::Net — TCP sockets module
...
- C runtime: socket(), bind(), listen(), accept(), connect(), send(), recv(), close()
- library/std/Net.bux: Net_Create, Net_Bind, Net_Listen, Net_Accept, Net_Connect,
Net_Send, Net_Recv, Net_Close, Net_SetReuse, Net_LastError
- examples/tcp_server.bux: echo server on 127.0.0.1:9000
- examples/tcp_client.bux: client that sends 'Hello from Bux!' and prints reply
2026-06-05 20:32:10 +03:00
dimgigov
9c6b516453
feat: restructure repo, borrow checker, expanded stdlib
...
- Reorganize repository to Rust-style layout:
compiler/bootstrap/ compiler/selfhost/ compiler/tests/
library/std/ library/runtime/ tests/ tools/
- Add buxs/ Windows-compatible project root
- Add borrow checker tests and implement:
- Alias analysis (double mutable borrow detection)
- Use-after-move detection for own T
- Expand standard library:
- Std::Os: Args, Env, Cwd, Chdir
- Std::Time: NowMs, NowUs, SleepMs
- Std::Process: Run, Output
- Std::Io: PrintInt64 (fixes 32-bit truncation bug)
- Add examples: os_time.bux, process.bux
- Fix PrintInt to use int64_t in C runtime
2026-06-05 20:08:17 +03:00