Skip to content

Conversation

@khoi
Copy link
Collaborator

@khoi khoi commented May 15, 2025

  • Strip down UI stuff (SwiftUI, UIKit)
  • Polyfill some CoreGraphics types
  • The ultimate goal is to make this buildable with just Foundation (XP compliant)

To reviewers: Search for #if os(WASI), that should indicate the codes where I add new things

Tests are failing if u run on macOS even on the original repo, it's not a priority to fix

khoi added 7 commits May 10, 2025 13:48
- Implement complete CGAffineTransform struct for environments without CoreGraphics
- Move identity property to shared extension for cross-platform consistency
- Make SVGStroke and SVGPath initializers more flexible with optional parameters
- Improve code readability with multiline parameter formatting
@khoi khoi changed the title Khoi/yolo Making SVGView XP compliant May 15, 2025
khoi added 2 commits May 15, 2025 14:32
- Implement SVGBezierPath class for cross-platform path handling
- Restructure CoreGraphicsPolyfills with WASI/Linux specific implementations
- Add platform-specific conditionals to SVGPathReader
- Enhance CGAffineTransform and CGPath implementations
- Remove unused UI extensions
- Add proper imports for WASI (WASILibc) and Linux (Glibc)
- Implement MBezierPath with full functionality for WASI/Linux platforms
- Add missing math functions for non-Apple platforms
- Fix mutable path variable in SVG path reader
- Simplify CGAffineTransform serialization
elements.append(contentsOf: newElements)
}

public mutating func addEllipse(in rect: CGRect) {
Copy link
Collaborator Author

@khoi khoi May 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this file contains majority of the changes.

khoi added 2 commits May 15, 2025 14:50
- Part of ongoing cross-platform compatibility effort
- Eliminates iOS/macOS dependent SVGBezierPath class
- Related to graphics polyfill refactoring from previous commits
@khoi
Copy link
Collaborator Author

khoi commented May 15, 2025

Superseded by #2

@khoi khoi closed this May 15, 2025
@khoi khoi deleted the khoi/yolo branch September 26, 2025 09:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants