core-agent-ide/codex-rs/utils
Yaroslav Volovich 5b71246001
fix: simplify macOS sleep inhibitor FFI (#12340)
Summary
- simplify the macOS sleep inhibitor FFI by replacing `dlopen` / `dlsym`
/ `transmute` with normal IOKit extern calls and `SAFETY` comments
- switch to cfg-selected platform implementations
(`imp::SleepInhibitor`) instead of `Box<dyn ...>`
- check in minimal IOKit bindings generated with `bindgen` and include
them from the macOS backend
- enable direct IOKit linkage in Bazel macOS builds by registering
`IOKit` in the Bazel `osx.framework(...)` toolchain extension list
- update `Cargo.lock` and `MODULE.bazel.lock` after removing the
build-time `bindgen` dependency path

Testing
- `just fmt`
- `cargo clippy -p codex-utils-sleep-inhibitor --all-targets -- -D
warnings`
- `cargo test -p codex-utils-sleep-inhibitor`
- `bazel test //codex-rs/utils/sleep-inhibitor:all --test_output=errors`
- `just bazel-lock-update`
- `just bazel-lock-check`

Context
- follow-up to #11711 addressing Ryan's review comments
- `bindgen` is used to generate the checked-in bindings file, but not at
build time
2026-02-20 09:52:21 -08:00
..
absolute-path fix: Fix tilde expansion to avoid absolute-path escape (#9621) 2026-01-21 10:43:10 -08:00
approval-presets feat: make sandbox read access configurable with ReadOnlyAccess (#11387) 2026-02-11 18:31:14 -08:00
cache feat: add support for building with Bazel (#8875) 2026-01-09 11:09:43 -08:00
cargo-bin feat: experimental flags (#10231) 2026-02-02 11:06:50 +00:00
cli chore(core) Deprecate approval_policy: on-failure (#11631) 2026-02-12 13:23:30 -08:00
elapsed feat: split codex-common into smaller utils crates (#11422) 2026-02-11 12:59:24 +00:00
fuzzy-match feat: split codex-common into smaller utils crates (#11422) 2026-02-11 12:59:24 +00:00
git feat: add support for building with Bazel (#8875) 2026-01-09 11:09:43 -08:00
home-dir Validate CODEX_HOME before resolving (#10249) 2026-01-30 15:46:33 -08:00
image adding image support for gif and webp (#11237) 2026-02-09 14:47:22 -08:00
json-to-toml feat: add support for building with Bazel (#8875) 2026-01-09 11:09:43 -08:00
oss feat: split codex-common into smaller utils crates (#11422) 2026-02-11 12:59:24 +00:00
pty Fix flaky windows CI test (#10993) 2026-02-07 08:55:42 -08:00
readiness feat: add support for building with Bazel (#8875) 2026-01-09 11:09:43 -08:00
rustls-provider chore: put crypto provider logic in a shared crate (#11294) 2026-02-10 01:04:31 -08:00
sandbox-summary feat: introduce Permissions (#11633) 2026-02-12 14:42:54 -08:00
sanitizer chore: drop and clean from phase 1 (#11605) 2026-02-12 17:23:00 +00:00
sleep-inhibitor fix: simplify macOS sleep inhibitor FFI (#12340) 2026-02-20 09:52:21 -08:00
string Include real OS info in metrics. (#10425) 2026-02-05 06:30:31 -08:00