Top module#30
Conversation
📝 WalkthroughWalkthroughThis PR refactors the platform abstraction layer from C++20 module-based to traditional header-based implementation. It introduces a new ChangesPlatform Layer Refactoring
Sequence DiagramsequenceDiagram
participant main as main.cpp
participant draconic as draconic module
participant platform as platform.cppm
participant impl_header as platform_impl.h
participant win32 as win32.cpp<br/>(impl namespace)
participant mac as mac.mm<br/>(impl namespace)
participant linux as linux.cpp<br/>(impl namespace)
main->>draconic: import draconic
draconic->>platform: export import platform
platform->>impl_header: `#include` impl/platform_impl.h
platform->>platform: using NativeWindowType<br/>using NativeWindowFrame
main->>platform: call get_native_handles()
platform->>impl_header: call impl::get_native_handles()
impl_header->>win32: conditional compile (WIN32)
impl_header->>mac: conditional compile (APPLE)
impl_header->>linux: conditional compile (Linux)
win32-->>impl_header: return NativeWindowFrame
mac-->>impl_header: return NativeWindowFrame
linux-->>impl_header: return NativeWindowFrame
impl_header-->>platform: NativeWindowFrame
platform-->>main: NativeWindowFrame
Estimated Code Review Effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly Related PRs
Suggested Reviewers
Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
import draconic;can now import everything underengine/native(we can already rename that directory, tbd).Also, move platform implementation details to an internal static library.
Summary by CodeRabbit