Wiring lib for x86_64?

It would be comfortable to have an Arduino.h for env:linux_x86_64 … does it exist?

For unit testing, a fake Arduino core implementation used that is mocked: platformio-examples/unit-testing/arduino-mock at develop · platformio/platformio-examples · GitHub (based on GitHub - FabioBatSilva/ArduinoFake: Arduino mocking made easy).

However this is really trimmed towards unit-testing, the functions themselves are all non-implemented (except String maybe) and are meant to be used in a way where a user will tell a function what to return.

I’ve also seen the Marlin firmware do similiar things (just fake a few Arduino APIs and record the result for testing, Marlin/Marlin/src/HAL/LINUX at 2.0.x · MarlinFirmware/Marlin · GitHub).

The clostest thing I know about is GitHub - me-no-dev/RasPiArduino: Arduino Framework for RaspberryPI, a Arduino implementation for the Raspberry Pi Linux Desktop. Except for the Raspberry-Pi hardware-specific calls there shouldn’t be any ARM-specific code in it. Maybe that can be used as a base.

Or, the standard Arduino AVR implementation can be used as base: ArduinoCore-avr/cores/arduino at master · arduino/ArduinoCore-avr · GitHub.

Fundamentally of course, you can’t functionally implement the whole Arduino core on a standard desktop – since you don’t have access to the harwdare registers or an Intel CPU’s I2C bus or whatever, and there are no exposed pins for connection.