Skip to content

Add macOS arm64 developer support - #356

Merged
huangminghuang merged 48 commits into
masterfrom
feature/macos-arm64-support
Jul 1, 2026
Merged

Add macOS arm64 developer support#356
huangminghuang merged 48 commits into
masterfrom
feature/macos-arm64-support

Conversation

@huangminghuang

@huangminghuang huangminghuang commented May 26, 2026

Copy link
Copy Markdown
Contributor

Summary

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

What changed

  • Adds a macos-26 Apple Silicon workflow (macos_arm64_build.yaml) that configures a Release build, builds all, runs the parallelizable CTest set for PRs, pushes to master, and a nightly scheduled run on origin/master, and runs the sharded NP/LR sweep only on nightly schedule or explicit manual opt-in.
  • Shares .github/scripts/build-sysio.sh between Linux and macOS CI by making the build directory, vcpkg triplets, compiler settings, and cache paths environment-driven while keeping Linux workspace ownership repair in the Linux workflow.
  • Adds an arm64-osx-release vcpkg overlay triplet matching the Linux release-triplet pattern, including release-only vcpkg dependencies and ccache launchers.
  • Pins wire-vcpkg-registry to a master commit containing the macOS-compatible Boost, SoftFloat, secp256k1, and wire-sys-vm 1.2.0 port updates, with wire-sys-vm pinned to eos-vm master including Fix Clang unroll warning in LEB128 helpers eos-vm#13.
  • Enables sys-vm-jit by default for Apple arm64 builds while keeping x86-only profiling JIT support gated to x86_64.
  • Gates Linux/x86-only behavior away from macOS, including linker flags, LLVM/OC assumptions, allocator defaults, and unsupported runtime paths.
  • 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/libc++ gaps that remain on macOS 26, including missing std::views::enumerate, missing std::move_only_function, std::chrono::utc_clock usage, and time_t/fc::variant integer typing.
  • 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 CI path to an Apple Silicon Release build using checked-in contract artifacts, while enabling both interpreted sys-vm and plain sys-vm-jit on Apple arm64. Profiling JIT and OC remain gated to platforms that support them.

Testing

  • ctest -R '^performance_test_basic_transfer_trx_spec$' --output-on-failure -V
  • CI is the source of truth for full build/test status. The macOS workflow builds Release all and runs the parallelizable CTest set for PRs, pushes to master, and the nightly origin/master schedule. The macOS sharded NP/LR sweep is skipped for PRs and runs only on the nightly schedule or when manually dispatched with run_sharded_np_lr enabled. The Linux workflow keeps the existing amd64 matrix coverage.
  • Locally validated macOS arm64 Release configure/build and representative runtime tests before moving that coverage into CI.
  • Locally validated the Debug native-module path with native contract output from the paired CDT work, including native overlay and sysio.token contract tests.
  • For the shared CI helper and workflow updates, validated bash -n .github/scripts/build-sysio.sh, YAML parsing for both workflows, and git diff --check.

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. The workflow is named macos_arm64_build.yaml because it builds all and runs parallelizable tests in automated CI. It does not build contracts through CDT and does not run native-module tests.
  • The macOS nightly schedule runs at 08:00 UTC from the default branch, providing nightly coverage for origin/master after this workflow is merged.
  • The macOS sharded NP/LR sweep is no longer part of PR CI; it runs on the nightly schedule and can also be requested manually with run_sharded_np_lr enabled.
  • 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-oc, CDT contract rebuilds in CI, and native-debug CI coverage remain out of scope for this PR.

E2E workflow

@huangminghuang
huangminghuang force-pushed the feature/macos-arm64-support branch 2 times, most recently from e08668b to 3d6fe29 Compare May 26, 2026 20:43
@huangminghuang
huangminghuang marked this pull request as ready for review May 29, 2026 19:39
@huangminghuang
huangminghuang requested a review from heifner May 29, 2026 19:39
Comment thread plugins/producer_plugin/include/sysio/producer_plugin/trx_priority_db.hpp Outdated
Comment thread plugins/wallet_plugin/src/wallet_manager.cpp Outdated
Comment thread programs/examples/cranker-example/src/main.cpp Outdated
Comment thread CLAUDE.md Outdated
@huangminghuang
huangminghuang requested a review from heifner June 5, 2026 15:32
@huangminghuang
huangminghuang force-pushed the feature/macos-arm64-support branch from 820a50d to e9d22c5 Compare June 14, 2026 19:47
@huangminghuang
huangminghuang changed the base branch from master to codex/port-sharded-np-lr-tests June 14, 2026 19:47
@huangminghuang
huangminghuang changed the base branch from codex/port-sharded-np-lr-tests to master June 18, 2026 18:43
@huangminghuang
huangminghuang requested a review from heifner June 30, 2026 23:21
@huangminghuang
huangminghuang merged commit 046eae0 into master Jul 1, 2026
11 checks passed
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.

2 participants