# emexlab/emexde architecture

> Architecture diagram of the GitHub repository emexlab/emexde, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-11). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/emexlab/emexde
- Repository: https://github.com/emexlab/emexde

## Overview

Nyxian is an on-device iOS IDE paired with a userspace microkernel for compiling, signing, and running iOS software offline. The principal workflow is project work in the IDE, followed by dependency/SDK-aware compilation and Mach-O linking, then execution through the microkernel and its process shims. The repository also exposes project/file management, customization, and recovery interfaces. Some runtime internals are represented by their documented subsystem paths because their source was not sampled; edges based on product capabilities cite the README.

Main entry points: [`Frameworks/CoreCompiler/Tools/CCDriver.cpp`](https://github.com/emexlab/emexde/blob/main/Frameworks/CoreCompiler/Tools/CCDriver.cpp) (Compiler Driver), [`ksurface_abi.h`](https://github.com/emexlab/emexde/blob/main/ksurface_abi.h) (Userspace Microkernel), [`Nyxian/LindChain/IDEBuilder/NXBuilder+MDKDriver.swift`](https://github.com/emexlab/emexde/blob/main/Nyxian/LindChain/IDEBuilder/NXBuilder%2BMDKDriver.swift) (Build Orchestration), [`LiveProcess/LindChain/Services/bootstrapd`](https://github.com/emexlab/emexde/tree/main/LiveProcess/LindChain/Services/bootstrapd) (Extension Execution)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ide["IDE Experience"]
  node_boot["App Boot and Recovery"]
  node_project["Project Configuration<br/>[NXBuilder.swift]"]
  node_builder["Build Orchestration"]
  node_phase["Build Phases"]
  node_filemanager["File Management"]
  node_customize["Editor Customization"]
end

subgraph group_toolchain["Build Toolchain"]
  node_driver["Compiler Driver<br/>[CCDriver.cpp]"]
  node_deps["Dependency Scanning"]
  node_sdk["SDK Selection<br/>[CCSDK.cpp]"]
  node_compile["Language Compilation<br/>[CCCompiler.cpp]"]
  node_swiftcompile["Swift Compilation"]
  node_link["Mach-O Linking<br/>[CCLinker.cpp]"]
end

subgraph group_execution["Guest Execution"]
  node_sign["Executable Signing"]
  node_extension["Extension Execution"]
end

subgraph group_kernel["Microkernel Runtime"]
  node_ksurface["Userspace Microkernel<br/>[ksurface_abi.h]"]
  node_kext["Kext Link Editor<br/>[ResecureDecoder.h]"]
  node_syscalls["Syscall Handling<br/>[LiveShimSyscall.c]"]
  node_shims["Process Shims"]
end

subgraph group_support["Runtime Support"]
  node_hooks["Thread Hooking"]
  node_sdkdownload["SDK Resources<br/>[fdownload.h]"]
end

node_developer(("Developer"))
node_os(("iOS Host"))

node_developer -->|"opens IDE"| node_boot
node_boot -.->|"opens projects"| node_project
node_developer -.->|"manages files"| node_filemanager
node_developer -.->|"sets preferences"| node_customize
node_project -.->|"requests build"| node_builder
node_builder -.->|"runs phases"| node_phase
node_builder -->|"invokes driver"| node_driver
node_driver -.->|"scans dependencies"| node_deps
node_driver -.->|"selects SDK"| node_sdk
node_driver -->|"compiles sources"| node_compile
node_driver -->|"compiles Swift"| node_swiftcompile
node_driver -->|"links objects"| node_link
node_link -->|"produces executable"| node_sign
node_sign -->|"enables execution"| node_extension
node_extension -->|"runs guest"| node_ksurface
node_ksurface -->|"loads extensions"| node_kext
node_ksurface -->|"handles syscalls"| node_syscalls
node_syscalls -->|"dispatches calls"| node_shims
node_hooks -.->|"supports hooks"| node_ksurface
node_sdkdownload -.->|"provides SDK"| node_sdk
node_extension -->|"uses host services"| node_os

click node_boot "https://github.com/emexlab/emexde/blob/main/Nyxian/UI/BootViewController.swift"
click node_project "https://github.com/emexlab/emexde/blob/main/Nyxian/LindChain/IDEBuilder/NXBuilder.swift"
click node_builder "https://github.com/emexlab/emexde/blob/main/Nyxian/LindChain/IDEBuilder/NXBuilder%2BMDKDriver.swift"
click node_phase "https://github.com/emexlab/emexde/blob/main/Nyxian/LindChain/IDEBuilder/NXBuilder%2BMDKPhaseRunner.swift"
click node_filemanager "https://github.com/emexlab/emexde/blob/main/Nyxian/UI/FileList/FileInfoViewController.swift"
click node_customize "https://github.com/emexlab/emexde/blob/main/Nyxian/UI/Settings/CustomizationViewController.swift"
click node_driver "https://github.com/emexlab/emexde/blob/main/Frameworks/CoreCompiler/Tools/CCDriver.cpp"
click node_deps "https://github.com/emexlab/emexde/blob/main/Frameworks/CoreCompiler/Tools/CCDependencyScanner.cpp"
click node_sdk "https://github.com/emexlab/emexde/blob/main/Frameworks/CoreCompiler/Tools/CCSDK.cpp"
click node_compile "https://github.com/emexlab/emexde/blob/main/Frameworks/CoreCompiler/Tools/Compiler/CCCompiler.cpp"
click node_swiftcompile "https://github.com/emexlab/emexde/blob/main/Frameworks/CoreCompiler/Tools/Compiler/CCSwiftCompiler.cpp"
click node_link "https://github.com/emexlab/emexde/blob/main/Frameworks/CoreCompiler/Tools/Linker/CCLinker.cpp"
click node_sign "https://github.com/emexlab/emexde/tree/main/Nyxian/LindChain"
click node_extension "https://github.com/emexlab/emexde/tree/main/LiveProcess/LindChain/Services/bootstrapd"
click node_ksurface "https://github.com/emexlab/emexde/blob/main/ksurface_abi.h"
click node_kext "https://github.com/emexlab/emexde/blob/main/LiveProcess/ResecureDecoder.h"
click node_syscalls "https://github.com/emexlab/emexde/blob/main/Frameworks/LiveShim/LiveShimSyscall.c"
click node_shims "https://github.com/emexlab/emexde/tree/main/Frameworks/LiveShim/shims"
click node_hooks "https://github.com/emexlab/emexde/blob/main/Frameworks/HWHook/HWHookThreadContext.c"
click node_sdkdownload "https://github.com/emexlab/emexde/blob/main/Nyxian/LindChain/Downloader/fdownload.h"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_boot,node_project,node_builder,node_phase,node_filemanager,node_customize toneBlue
class node_driver,node_deps,node_sdk,node_compile,node_swiftcompile,node_link toneAmber
class node_sign,node_extension toneMint
class node_ksurface,node_kext,node_syscalls,node_shims toneRose
class node_hooks,node_sdkdownload,node_developer,node_os toneIndigo
```

## Components

### IDE Experience

- [App Boot and Recovery](https://github.com/emexlab/emexde/blob/main/Nyxian/UI/BootViewController.swift): `Nyxian/UI/BootViewController.swift`
- [Project Configuration](https://github.com/emexlab/emexde/blob/main/Nyxian/LindChain/IDEBuilder/NXBuilder.swift): `Nyxian/LindChain/IDEBuilder/NXBuilder.swift`
- [Build Orchestration](https://github.com/emexlab/emexde/blob/main/Nyxian/LindChain/IDEBuilder/NXBuilder%2BMDKDriver.swift): `Nyxian/LindChain/IDEBuilder/NXBuilder+MDKDriver.swift`
- [Build Phases](https://github.com/emexlab/emexde/blob/main/Nyxian/LindChain/IDEBuilder/NXBuilder%2BMDKPhaseRunner.swift): `Nyxian/LindChain/IDEBuilder/NXBuilder+MDKPhaseRunner.swift`
- [File Management](https://github.com/emexlab/emexde/blob/main/Nyxian/UI/FileList/FileInfoViewController.swift): `Nyxian/UI/FileList/FileInfoViewController.swift`
- [Editor Customization](https://github.com/emexlab/emexde/blob/main/Nyxian/UI/Settings/CustomizationViewController.swift): `Nyxian/UI/Settings/CustomizationViewController.swift`

### Build Toolchain

- [Compiler Driver](https://github.com/emexlab/emexde/blob/main/Frameworks/CoreCompiler/Tools/CCDriver.cpp): `Frameworks/CoreCompiler/Tools/CCDriver.cpp`
- [Dependency Scanning](https://github.com/emexlab/emexde/blob/main/Frameworks/CoreCompiler/Tools/CCDependencyScanner.cpp): `Frameworks/CoreCompiler/Tools/CCDependencyScanner.cpp`
- [SDK Selection](https://github.com/emexlab/emexde/blob/main/Frameworks/CoreCompiler/Tools/CCSDK.cpp): `Frameworks/CoreCompiler/Tools/CCSDK.cpp`
- [Language Compilation](https://github.com/emexlab/emexde/blob/main/Frameworks/CoreCompiler/Tools/Compiler/CCCompiler.cpp): `Frameworks/CoreCompiler/Tools/Compiler/CCCompiler.cpp`
- [Swift Compilation](https://github.com/emexlab/emexde/blob/main/Frameworks/CoreCompiler/Tools/Compiler/CCSwiftCompiler.cpp): `Frameworks/CoreCompiler/Tools/Compiler/CCSwiftCompiler.cpp`
- [Mach-O Linking](https://github.com/emexlab/emexde/blob/main/Frameworks/CoreCompiler/Tools/Linker/CCLinker.cpp): `Frameworks/CoreCompiler/Tools/Linker/CCLinker.cpp`

### Guest Execution

- [Executable Signing](https://github.com/emexlab/emexde/tree/main/Nyxian/LindChain): `Nyxian/LindChain`
- [Extension Execution](https://github.com/emexlab/emexde/tree/main/LiveProcess/LindChain/Services/bootstrapd): `LiveProcess/LindChain/Services/bootstrapd`

### Microkernel Runtime

- [Userspace Microkernel](https://github.com/emexlab/emexde/blob/main/ksurface_abi.h): `ksurface_abi.h`
- [Kext Link Editor](https://github.com/emexlab/emexde/blob/main/LiveProcess/ResecureDecoder.h): `LiveProcess/ResecureDecoder.h`
- [Syscall Handling](https://github.com/emexlab/emexde/blob/main/Frameworks/LiveShim/LiveShimSyscall.c): `Frameworks/LiveShim/LiveShimSyscall.c`
- [Process Shims](https://github.com/emexlab/emexde/tree/main/Frameworks/LiveShim/shims): `Frameworks/LiveShim/shims`

### Runtime Support

- [Thread Hooking](https://github.com/emexlab/emexde/blob/main/Frameworks/HWHook/HWHookThreadContext.c): `Frameworks/HWHook/HWHookThreadContext.c`
- [SDK Resources](https://github.com/emexlab/emexde/blob/main/Nyxian/LindChain/Downloader/fdownload.h): `Nyxian/LindChain/Downloader/fdownload.h`

### Other components

- **Developer**
- **iOS Host**

## Connections

- Developer → App Boot and Recovery: opens IDE
- App Boot and Recovery → Project Configuration: opens projects
- Developer → File Management: manages files
- Developer → Editor Customization: sets preferences
- Project Configuration → Build Orchestration: requests build
- Build Orchestration → Build Phases: runs phases
- Build Orchestration → Compiler Driver: invokes driver
- Compiler Driver → Dependency Scanning: scans dependencies
- Compiler Driver → SDK Selection: selects SDK
- Compiler Driver → Language Compilation: compiles sources
- Compiler Driver → Swift Compilation: compiles Swift
- Compiler Driver → Mach-O Linking: links objects
- Mach-O Linking → Executable Signing: produces executable
- Executable Signing → Extension Execution: enables execution
- Extension Execution → Userspace Microkernel: runs guest
- Userspace Microkernel → Kext Link Editor: loads extensions
- Userspace Microkernel → Syscall Handling: handles syscalls
- Syscall Handling → Process Shims: dispatches calls
- Thread Hooking → Userspace Microkernel: supports hooks
- SDK Resources → SDK Selection: provides SDK
- Extension Execution → iOS Host: uses host services
