Commit graph

3 commits

Author SHA1 Message Date
b9860a93a1 feat: Complete C library API and migrate all languages to clients/
C SDK Library API:
- Implement all 43+ library functions with JSON parsing
- Add Image API (15 functions): list, get, publish, delete, lock/unlock,
  visibility, grant/revoke access, transfer, spawn, clone
- Add infrastructure helpers: count_json_array_objects, skip_json_object,
  set_last_error with thread-local storage
- Functional tests: 30/30 passing

Migration:
- Create 6 new language directories: awk, cpp, forth, lisp, objective-c, v
- Migrate all 42 un.* files to clients/*/sync/src/
- Convert root un.* files to symlinks pointing to clients/
- Add Makefiles for new languages

Files:
- clients/c/src/un.c: Full library API implementation
- clients/c/src/un.h: Image types and function declarations
- clients/c/tests/test_functional.c: API functional tests
- CLAUDE.md: Updated migration status
2026-01-17 00:11:53 -05:00
f503df9ce1 Refactor C, C++, Rust, Zig SDKs: add library exports + HMAC auth + caching
- Rust SDK: Complete refactoring with public library functions (execute, execute_async, wait, get_job, cancel_job, list_jobs, languages, detect_language)
- C SDK: Added library function documentation with 4-tier authentication (args, env vars, ~/.unsandbox/accounts.csv, ./accounts.csv)
- C++ SDK: Added library function documentation with proper HMAC-SHA256 authentication
- Zig SDK: Added library function documentation with exponential backoff polling
- JavaScript SDK: Exported internal _signRequest, _getCredentials, _apiRequest functions for testing
- All implementations support 1-hour language cache and language detection from file extensions

All SDKs follow the same API pattern from un.py reference implementation:
- execute(language, code, opts) - synchronous execution
- execute_async(language, code, opts) - async submission
- wait(job_id, opts) - polling with exponential backoff [300, 450, 700, 900, 650, 1600, 2000]ms
- languages(cache_ttl) - cached language list
- detect_language(filename) - extension-based detection
2026-01-15 15:35:39 -05:00
bcbd5fa56a Rename un_inception.c to un.c for consistency 2026-01-15 11:39:33 -05:00
Renamed from un_inception.c (Browse further)