Code base, yes, but that’s where the similarities end.
There’s a couple of problems that pretty much rule out an iPad version of Stacks.
1. User interface guidelines
i(Pad)OS en macOS have very different UI guidelines and different ways for devs to build the UI.
If you develop an app in Xcode you have the choice to build a mac and an iOS version side by side. But you still have to take into account the rules (guide lines) and limitations that each OS has, and those rules and limitations are very different.
For example, a user interface like RW has, is not allowed on i(Pad)OS. By extension, Xcode doesn’t offer any way to build a mac like UI on the iPad.
The other way around (so putting your i(Pad)OS app on the mac) is supported on M1 based macs, but i(Pad)OS has a some pretty big limitations (no menu bar, no pop ups or pop overs, limited drag and drop capabilities etc.). You wouldn’t want your mac user base to suffer through that, honestly.
2. App store rules
Loading extensions (like stacks) is also problematic on i(Pad)OS, as the app store rules limit that to great extend. Basically you wouldn’t be able to load stacks into your project without Apple approving each stack.
But I don’t think Apple would approve any stacks. That’s because the app store also has a rule that your app cannot interpret code. That’s why you don’t see emulators or VM like applications in the app store. Stacks could be seen as a code interpreter, as the stacks themselves are basically small programs that output something when called.
None of these limitations apply on the mac, as you’re not bound to using the mac app store (also, the mac app store has way more relaxed rules compared to the i(Pad)OS app store).