{"id":44175843,"url":"https://github.com/q2333gh/Lucid","last_synced_at":"2026-02-21T13:01:10.854Z","repository":{"id":307053137,"uuid":"1028102383","full_name":"q2333gh/Lucid","owner":"q2333gh","description":"Lucid : Internet Computer C Canister  Development Kit  , focused on clarity, simplicity, and ease of use.","archived":false,"fork":false,"pushed_at":"2026-02-05T16:10:16.000Z","size":774,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-02-06T01:55:03.561Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/q2333gh.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-07-29T03:28:25.000Z","updated_at":"2026-02-05T16:14:55.000Z","dependencies_parsed_at":"2025-07-29T07:45:57.316Z","dependency_job_id":"caf51843-f25a-4b58-a552-ef5156b75bf6","html_url":"https://github.com/q2333gh/Lucid","commit_stats":null,"previous_names":["q2333gh/lucid"],"tags_count":25,"template":false,"template_full_name":null,"purl":"pkg:github/q2333gh/Lucid","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/q2333gh%2FLucid","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/q2333gh%2FLucid/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/q2333gh%2FLucid/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/q2333gh%2FLucid/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/q2333gh","download_url":"https://codeload.github.com/q2333gh/Lucid/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/q2333gh%2FLucid/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29681468,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-21T12:30:22.644Z","status":"ssl_error","status_checked_at":"2026-02-21T12:29:55.402Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-02-09T13:00:34.292Z","updated_at":"2026-02-21T13:01:10.843Z","avatar_url":"https://github.com/q2333gh.png","language":"C","funding_links":[],"categories":["Canister Development Kits (CDKs)"],"sub_categories":["C/C++"],"readme":"\u003e **⚠️ Under Heavy Development**  \n\u003e This project is currently under active development. Many features are still in development and APIs may change without notice. Documentation updates may lag behind the latest features—please expect some information to be incomplete or outdated for now.\n---\n\n# Lucid : Internet Computer Canister development kit for C, focused on clarity, simplicity, and ease of understanding.\n\n\nA pure C language SDK for developing Internet Computer (IC) canisters. This SDK provides a lightweight, with minimal dependencies and fast compilation. \n\n## Features\n\n- **Pure C Implementation**: minimal runtime overhead and precise control\n- **WASI Support**: Compile to IC compatible wasm module\n- **High-level API**: Easy-to-use API for common IC operations\n- **Candid Support**: Built-in Candid serialization/deserialization\n\n## Getting Started\n\n### Prerequisites\n\n- **Python 3**: Required for build scripts\n\n### Building the SDK\n\n```bash\n\n# Build with hello examples\npython build.py --new hello_lucid\npython build.py --icwasm --examples hello_lucid\n\n```\n\n### Quick Example\n\nCreate a simple canister function:\n\n```c\n#include \"ic_c_sdk.h\"\n\nIC_CANDID_EXPORT_DID()\n\nIC_API_QUERY(greet, \"() -\u003e (text)\") {\n    // api variable is automatically initialized\n    IC_API_REPLY_TEXT(\"Hello from C!\");\n    // api is automatically freed when function returns\n}\n```\n\nBuild and test:\n\n```bash\n# Build WASM\npython build.py --icwasm\n\n# Run tests with PocketIC\npython examples/hello_lucid/test/t1_candid.py\n```\n\n## Project Structure\n\n```\nLucid/\n├── build.py         # Main build script (root level)\n├── cdk-c/\n│   ├── include/     # Header files\n│   │   ├── ic_c_sdk.h   # Main SDK header\n│   │   ├── ic_api.h     # High-level API\n│   │   ├── ic_simple.h  # Simplified API macros\n│   │   ├── ic_candid.h  # Candid support\n│   │   └── ...\n│   ├── src/        # SDK source files\n│   └── scripts/    # Build utilities\n│       └── build_utils/ # Build utility modules\n├── examples/       # Example canisters\n│   └── hello_lucid/ # Hello world example\n├── build/          # Native build output directory\n└── build-wasi/     # WASI build output directory\n```\n\n## Build Options\n\nThe build script supports the following options:\n\n```bash\n# Build native library (for testing, runs CTest automatically)\npython build.py\n\n# Build WASI library (for IC deployment)\npython build.py --icwasm\n```\n\nThe `--icwasm` flag builds IC-compatible WASM canisters with automatic post-processing (wasi2ic conversion, wasm-opt optimization, and Candid interface extraction).\n\n## API Overview\n\n### Simplified API (Recommended)\n\nThe `IC_API_QUERY` and `IC_API_UPDATE` macros automatically handle API initialization and cleanup:\n\n```c\nIC_API_QUERY(my_query, \"() -\u003e (text)\") {\n    // api is automatically initialized and available\n    ic_principal_t caller = ic_api_get_caller(api);\n    \n    // Convenient reply macros\n    IC_API_REPLY_TEXT(\"response\");\n    IC_API_REPLY_NAT(42);\n    IC_API_REPLY_INT(-10);\n    IC_API_REPLY_EMPTY();\n    \n    // api is automatically freed when function returns\n}\n```\n\n## Testing\n\nThis project uses PocketIC for local testing. PocketIC provides a fast, deterministic IC replica for testing canisters.\n\n### Running Tests\n\n```bash\n# Build the canister first\npython build.py --icwasm\n\n# Run tests\npython examples/hello_lucid/test/t1_candid.py\n```\n\nThe test script will:\n- Automatically set up PocketIC\n- Create and install the canister\n- Test canister functions using Candid interface\n- Verify responses and behavior\n\n## Examples\n\nSee `examples/hello_lucid/` for a complete example canister with ic-py or local testnet replica tests.\n\n## Documentation\n\n- API documentation: See header files in `cdk-c/include/`\n- Build system: Run `python build.py --help` or see `doc/build.md`\n- Examples: See `examples/` directory\n\n## License\nApache 2.0\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fq2333gh%2FLucid","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fq2333gh%2FLucid","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fq2333gh%2FLucid/lists"}