Skip to content

Build warnings on macOS: deprecated libc mach timebase APIs and unsafe_op_in_unsafe_fn #26

@vabaimova

Description

@vabaimova

When installing catenary-mcp via cargo install --git https://github.com/TwoWells/Catenary catenary-mcp on macOS, there are several build warnings in the catenary-proc crate.

Details

  1. Deprecated libc Mach Timebase APIs: Multiple warnings recommend using the mach2 crate instead of deprecated libc::mach_timebase_info_data_t and libc::mach_timebase_info.
  2. Rust 2024 Compatibility (unsafe_op_in_unsafe_fn): Multiple E0133 warnings because unsafe operations are performed inside unsafe fn without an explicit unsafe {} block (a lint/warning in the 2024 edition).
Build Output
warning: use of deprecated type alias `libc::mach_timebase_info_data_t`: Use the `mach2` crate instead
   --> crates/catenary-proc/src/lib.rs:537:34

warning: use of deprecated function `libc::mach_timebase_info`: Use the `mach2` crate instead
   --> crates/catenary-proc/src/lib.rs:538:15

warning[E0133]: call to unsafe function `platform::read_task_info` is unsafe and requires unsafe block
   --> crates/catenary-proc/src/lib.rs:535:29
...

These warnings should be addressed to keep the macOS build clean and prepare for the Rust 2024 edition.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions