Skip to content

Add macOS arm64 developer support#356

Draft
huangminghuang wants to merge 4 commits into
masterfrom
feature/macos-arm64-support
Draft

Add macOS arm64 developer support#356
huangminghuang wants to merge 4 commits into
masterfrom
feature/macos-arm64-support

Conversation

@huangminghuang
Copy link
Copy Markdown
Contributor

@huangminghuang huangminghuang commented May 26, 2026

Summary

Adds macOS Apple Silicon support for Wire Sysio, including the Release CI path, Apple arm64 dependency registry updates, macOS-safe CMake/runtime gates, and native-debug host integration.

What changed

  • Adds a macos-15 Apple Silicon workflow that configures a Release build, builds all, and runs the parallelizable CTest set.
  • Adds an arm64-osx-release vcpkg overlay triplet matching the Linux release-triplet pattern, including release-only vcpkg dependencies and ccache launchers.
  • Pins the Wire vcpkg registry updates for macOS-compatible Boost, SoftFloat, secp256k1, and wire-sys-vm ports.
  • Gates Linux/x86-only behavior away from macOS, including linker flags, LLVM/JIT/OC assumptions, sys-vm runtime selection, and allocator defaults.
  • Defaults jemalloc off on macOS while preserving Linux defaults and sanitizer auto-disable behavior.
  • Updates SoftFloat type handling and related serialization/precondition paths for Apple arm64 compatibility.
  • Fixes AppleClang build issues in test/example code, including large integer literal typing, std::chrono::utc_clock, and unsupported std::format usage.
  • Skips sys-vm-oc-only chain plugin tests when OC is not enabled.
  • Enables macOS Debug native-module host support by allowing native-module on Apple Debug builds and generating Apple -exported_symbols_list files for native intrinsic exports.
  • Documents macOS developer setup and native-debug behavior in README.md, AGENTS.md, CLAUDE.md, and contracts/native-debug.md.

Why

The repo could not reliably configure, build, or test on Apple Silicon because Linux linker flags, allocator assumptions, x86-only runtime assumptions, GNU/libstdc++ expectations, and pre-merged vcpkg registry gaps leaked into the macOS path.

This PR narrows the supported macOS path to an Apple Silicon Release CI build using checked-in contract artifacts and interpreted sys-vm, while also preparing Debug-only native contract debugging now that CDT can emit Mach-O _native.so modules.

Testing

  • Configured macOS arm64 Release builds with arm64-osx and arm64-osx-release triplet settings.
  • Built local macOS arm64 Release all target successfully before switching CI to Release mode.
  • Ran macOS arm64 parallelizable CTest locally after the Release build; remaining prior CI issue was diagnosed as Debug-mode runtime/timeout pressure, so CI now uses Release.
  • Ran five nonparallelizable tests locally on macOS arm64: http_plugin_unit_tests, nodeop_sanity_test, block_log_util_test, kiod_auto_launch_test, and cli_test.
  • Ran nodeop_run_test locally on macOS arm64 successfully.
  • Configured macOS native-debug build against local CDT with native-module enabled.
  • Built native_export_list, native_intrinsic_exports, unit_test, contracts_unit_test, and sysio.token_native.
  • Verified sysio.token_native.so is a Mach-O arm64 bundle exporting _apply.
  • Verified macOS host executables export native intrinsic symbols such as _require_auth and _prints.
  • Ran native_overlay_tests -- --native-module: 3/3 passed.
  • Ran contracts_unit_test --run_test=sysio_token_tests -- --native-module: 10/10 passed, 138 assertions.
  • Validated workflow YAML after edits.

Related PRs

  • Add macOS arm64 native support wire-cdt#66 adds the CDT-side native contract compilation support needed to emit macOS Mach-O _native.so modules. This sysio PR consumes that capability for local Debug native-module loading and host intrinsic export support.

Notes

  • macOS CI intentionally uses Release mode and interpreted sys-vm only. It does not build contracts through CDT and does not run native-module tests.
  • Local macOS Debug native contract debugging is in scope for this PR when paired with Add macOS arm64 native support wire-cdt#66: sysio enables native-module, exports host intrinsics with the macOS linker format, and documents the LLDB/native-module workflow.
  • sys-vm-jit, sys-vm-oc, CDT contract rebuilds in CI, and native-debug CI coverage remain out of scope for this PR.

@huangminghuang huangminghuang force-pushed the feature/macos-arm64-support branch from 52bbc49 to 5e1f12b Compare May 26, 2026 15:29
@huangminghuang huangminghuang force-pushed the feature/macos-arm64-support branch from e08668b to 3d6fe29 Compare May 26, 2026 20:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant