Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/cross-platform-ffi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ jobs:
- name: Install system dependencies (macOS)
if: matrix.os == 'macos-latest'
run: |
brew uninstall --ignore-dependencies cmake || true
brew install cmake pkg-config

- name: Install system dependencies (Windows)
Expand Down
13 changes: 13 additions & 0 deletions timelock-ffi/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -563,6 +563,10 @@ pub unsafe extern "C" fn timelock_get_last_error() -> *const c_char {

/// Get the version of the timelock library
///
/// # Safety
/// This function is safe to call from any context. It returns a pointer to
/// static string data that remains valid for the lifetime of the program.
///
/// # Returns
/// Null-terminated string with the version (static, no need to free)
#[no_mangle]
Expand All @@ -576,6 +580,11 @@ pub unsafe extern "C" fn timelock_get_version() -> *const c_char {
/// Call this function before using any other timelock functions.
/// It's safe to call this multiple times.
///
/// # Safety
/// This function is safe to call from any context and performs internal
/// validation of cryptographic constants. No special safety requirements
/// for the caller.
///
/// # Returns
/// `TimelockResult::Success` on success
#[no_mangle]
Expand All @@ -596,6 +605,10 @@ pub unsafe extern "C" fn timelock_init() -> TimelockResult {
///
/// Call this function when you're done using the timelock library.
/// It's safe to call this multiple times.
///
/// # Safety
/// This function is safe to call from any context and only cleans up
/// internal library state. No special safety requirements for the caller.
#[no_mangle]
pub unsafe extern "C" fn timelock_cleanup() {
// Clean up any global resources
Expand Down
Loading