You may be wondering what we’re doing with Windows here but some group of hackers managed to run the Windows 10 calculator on both Android and iOS. This hack is made possible as Microsoft recently open sourced the default Windows Calculator. Windows 10 users that use Android or iOS will love the novelty of it being ported to a different platform. Not that there aren’t many calculator apps available for the mobile OS but it’s just fun to see a Windows program on Android.

The developers here brought the Windows Calculator to C# and the Uno Platform. It’s also available on the Web via WebAssembly. What happened was the same C# and XAML code was used so it could run on desktop, mobile, and the web.

Uno Platform devs shared you can use the app found on the Apple App Store, Google Play Store, WebAssembly, and of course, Windows 10. So what’s so special about the Windows Calculator? Well, the software may appear simple but how it was coded was special and complex. It also comes with advanced functions despite the old calculation engine that it is 24 years old (since 1995).

The Windows Calculator also comes with different modes. There’s the Standard mode, Scientific mode, and a Programmer mode. Add the other features like shifting operations, interactive bit field view, a large set of converters, Dates calculator, precision arithmetic operations, expression view with parenthesis support, history view with selectable items, and an editable memory view. Note that the design is also responsive for windowed and orientation-aware devices. You may also take note of localization for 65 languages, buttons and history dynamic visibility, clipboard support, and narrator/voice-over accessibility support so yes, this calculator is very special.

Porting the Calculator Engine to the Uno Platform appears easy but it’s not. The developers encountered a lot of challenges. Some issues encountered include adjusting the C++ of the Calculation Engine, Native Code Interop Specifics, Converting the C++/CX code to C#, Converting the XAML, and Localization Resources. Some challenges listed have something to do with the following: Mono for WebAssembly Dynamic and Static Linking Support, the C adaptation layer, the case of C++ to C# callbacks, String Marshalling, and adding features to Uno Platform.

Read on how the developers did the porting HERE or check out the GitHub repository.