feat(cli): add craftlabs-auth-cli with status/activate/check/info/release commands

This commit is contained in:
2026-05-25 15:16:39 +08:00
parent 027ecbd375
commit 4b79533c70
6 changed files with 333 additions and 2 deletions
+1 -1
View File
@@ -5,7 +5,7 @@ edition = "2021"
description = "CraftLabs 授权核心库 — Rust 实现,导出 craft_* C ABI。目标平台:Linux(主)> Windows(次)> macOS(最低)"
[lib]
crate-type = ["cdylib", "staticlib"]
crate-type = ["cdylib", "staticlib", "lib"]
name = "craftlabs_auth_core"
[dependencies]
+5
View File
@@ -143,6 +143,11 @@ pub extern "C" fn craft_heartbeat(handle: *mut CraftContext) -> CraftResult {
.map_or_else(fail_result, |_| ok_result())
}
pub fn craft_initialize_with_config(config: &str) -> *mut CraftContext {
let c_str = std::ffi::CString::new(config).unwrap_or_default();
craft_initialize(c_str.as_ptr())
}
#[no_mangle]
pub extern "C" fn craft_destroy(handle: *mut CraftContext) {
if !handle.is_null() {