dimgigov
f02b354e9a
feat: bux test command + Std::Test module
...
- Add 'bux test' CLI command: discovers .bux files in tests/, compiles
each into a temp package, runs them, reports pass/fail
- Add Std::Test module with Assert, AssertEqInt, AssertTrue,
AssertFalse, Fail
- Add bux_exit and bux_assert C runtime primitives
- Update README.md and docs/BuildAndTest.md
2026-06-05 22:58:02 +03:00
dimgigov
154579b30d
feat: String_ToFloat + Json escape sequence support
...
- Add bux_str_to_float() C runtime wrapper (strtod)
- Add String_ToFloat() in library/std/String.bux
- Update JsonParser_ParseNumber to use String_ToFloat (decimals now work)
- Update JsonParser_ParseString to decode escape sequences (\n, \t, \r, \", \\, \b, \f)
- Fix use-after-free in JsonParser_ParseString: String_Copy before StringBuilder_Free
2026-06-05 22:35:50 +03:00
dimgigov
d0de9c2abf
feat: Std::Sync — Mutex and RwLock primitives
...
- Add bux_mutex_* and bux_rwlock_* C runtime functions
- Add library/std/Sync.bux with Mutex and RwLock wrappers
- Add examples/sync.bux — threaded counter with Mutex
- Update docs/Stdlib.md with Sync section and example
- Update README.md feature table
2026-06-05 22:30:44 +03:00
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
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