feat(phase-9.75g-0): Implement BID-FFI Day 1 - TLV encoding/decoding foundation

BID-1 Implementation Progress (Day 1 Complete\! 🎉):
- Add BID module structure (src/bid/)
- Implement BID-1 TLV (Type-Length-Value) format
  - TlvEncoder: Encode primitives, strings, handles
  - TlvDecoder: Decode with version checking
  - Full test coverage for all types
- Define core types and error codes
  - BidType enum with Handle design
  - Standard error codes (NYB_SUCCESS, NYB_E_*)
  - Platform-dependent pointer size (Usize)
- Fix unrelated Arc<dyn NyashBox> conversion error

Additional improvements:
- Add Rust build error handling guide to CLAUDE.md
  - Error file output pattern
  - 32-thread build rules
  - Common error patterns and solutions

Tests passing: 4/4 
- bid::types::tests (2 tests)
- bid::tlv::tests (2 tests)

Next: Day 2 - Metadata API implementation (init/abi/shutdown)

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Moe Charm
2025-08-17 18:32:15 +09:00
parent 2b738196ca
commit 2a96c91a81
7 changed files with 605 additions and 1 deletions

View File

@ -29,6 +29,9 @@ pub mod box_arithmetic; // 🚀 Arithmetic operations moved from box_trait.rs
// 🔥 NyashValue Revolutionary System (NEW!)
pub mod value;
// 🚀 BID-FFI: Box Interface Definition with FFI (NEW!)
pub mod bid;
// 🌐 P2P Communication Infrastructure (NEW!)
pub mod messaging;
pub mod transport;