dimgigov
0dade151d2
refactor: remove QBE backend, improve bootstrap compiler and stdlib
...
Bootstrap compiler improvements:
- Extract findStdlibDir() to remove hardcoded path and deduplicate
- Extract prepareProject()/mergeProject() to share code between cmdCheck/cmdBuild
- Fix C backend to emit warning on unknown types instead of silent 'int'
- Clean up all unused imports across 7 modules
- Makefile: add strip, debug target, clean-all, selfhost strip
QBE removal:
- Remove vendor/qbe/ (74K lines)
- Remove compiler/selfhost/qbe_backend.bux, nim_backend.bux
Stdlib improvements:
- Add Result.bux + Option.bux modules
- Fix Json.bux memory leak (removed double String_Copy)
- Add missing imports in Crypto.bux (Alloc/Free) and Test.bux (PrintLine/PrintInt)
- Clean stale buxc_debug binary
2026-06-06 00:51:11 +03:00
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
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
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