Skip to content

Enable the embedded version of the libary#50

Merged
natecook1000 merged 11 commits intomainfrom
re-enable-embedded
Jan 9, 2026
Merged

Enable the embedded version of the libary#50
natecook1000 merged 11 commits intomainfrom
re-enable-embedded

Conversation

@natecook1000
Copy link
Member

This re-enables the 'BinaryParsingEmbedded' target, which builds from the same sources as the non-embedded version of the library. I've also added a basic "parser" to test that the library is usable.

This re-enables the 'BinaryParsingEmbedded' target, which builds from
the same sources as the non-embedded version of the library. I've
also added a basic "parser" to test that the library is usable.
Package.swift Outdated
name: "swift-binary-parsing",
platforms: [
.macOS(.v13), .iOS(.v16), .watchOS(.v9), .tvOS(.v16), .visionOS(.v1),
.macOS(.v14), .iOS(.v17), .watchOS(.v10), .tvOS(.v17), .visionOS(.v1),
Copy link
Member

Choose a reason for hiding this comment

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

Why did you need to bump these deployment targets back up? Were they wrong?

Copy link
Member Author

Choose a reason for hiding this comment

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

With the embedded target added I get this error when I build locally:

<unknown>:0: error: compiling for macOS 13.0, but module 'Swift' has a minimum deployment target of macOS 14: /Users/nate/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2026-01-06-a.xctoolchain/usr/lib/swift/embedded/Swift.swiftmodule/arm64-apple-macos.swiftmodule

Copy link
Member

Choose a reason for hiding this comment

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

Drat. This undoes some of the improvement from #47. I don't know of a good way around it, though

Copy link
Member Author

Choose a reason for hiding this comment

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

Ended up needing to conditionalize the embedded support anyway, so the platforms are reset in the default case! 🎉

Copy link
Member

Choose a reason for hiding this comment

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

Thank you!

The array parser that is available in non-embedded contexts has an
untyped `throws` designation. This change allows for using typed
throws with the array parser even on non-embedded platforms.
@natecook1000 natecook1000 force-pushed the re-enable-embedded branch 5 times, most recently from 00bf97d to 34c31a5 Compare January 8, 2026 20:18
@natecook1000 natecook1000 marked this pull request as ready for review January 9, 2026 16:58
@natecook1000 natecook1000 merged commit 9fed023 into main Jan 9, 2026
15 checks passed
@natecook1000 natecook1000 deleted the re-enable-embedded branch January 9, 2026 16: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