stdlib: relocate modules under library/
- examples/modules/ -> library/modules/ (top-level, no more symlink hacks in consumer projects) - compiler discovers stdlib via _NSGetExecutablePath / readlink /proc/self/exe; searches dev layout (../../library), install layout (../library), and alongside-binary fallback - SX_STDLIB_PATH env var overrides for tests / dev convenience - SX_DEBUG_STDLIB env var dumps the discovery results - build.zig installs library/ alongside the binary - Compilation gains stdlib_paths field threaded through resolveImports - 50 tests pass; consumer projects can now build from any cwd
This commit is contained in:
17
library/modules/std/uikit.sx
Normal file
17
library/modules/std/uikit.sx
Normal file
@@ -0,0 +1,17 @@
|
||||
// UIKit framework bindings — iOS only.
|
||||
//
|
||||
// Consumers `#import "modules/std/uikit.sx";` and inherit the
|
||||
// `#framework "UIKit"` link directive plus any C-API declarations exposed
|
||||
// here. Obj-C class/method dispatch goes through `modules/std/objc.sx`
|
||||
// which we re-import so users only need this one file.
|
||||
|
||||
#import "objc.sx";
|
||||
|
||||
#framework "UIKit";
|
||||
|
||||
// int UIApplicationMain(int argc, char *_Nullable argv[_Nonnull],
|
||||
// NSString *_Nullable principalClassName,
|
||||
// NSString *_Nullable delegateClassName);
|
||||
//
|
||||
// Blocks. Drives the iOS run loop. Normally never returns.
|
||||
UIApplicationMain :: (argc: s32, argv: *void, principal_class: *void, delegate_class: *void) -> s32 #foreign;
|
||||
Reference in New Issue
Block a user