Skip to content

[Swift] Import WASILibc instead of Foundation on WASI in FlatBuffers - #9461

Open
AttilaTheFun wants to merge 1 commit into
google:masterfrom
AttilaTheFun:swift-wasi-without-foundation
Open

AttilaTheFun wants to merge 1 commit into
google:masterfrom
AttilaTheFun:swift-wasi-without-foundation

Conversation

@AttilaTheFun

@AttilaTheFun AttilaTheFun commented Nov 4, 2026 •

Copy link
Copy Markdown

The FlatBuffers and Common sources already keep every Foundation use behind #if !os(WASI) but still import Foundation there, which pulls Foundation into WASI builds that use none of it. On WASI they now import WASILibc. FlexBuffers is unchanged.

Tested: tests/swift/Wasm.tests under wasmtime with no Foundation in FlatBuffers' or Common's dependencies; swift build --target FlatBuffers on Linux.

@github-actions github-actions Bot added the swift label Nov 4, 2026
@google-cla

google-cla Bot commented Nov 4, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@AttilaTheFun
AttilaTheFun force-pushed the swift-wasi-without-foundation branch from e5fe157 to dda4e9e Compare November 4, 2026 16:17
@AttilaTheFun
AttilaTheFun marked this pull request as ready for review November 5, 2026 00:13
logan-shire-claude Bot added a commit to AttilaTheFun/bazel_registry that referenced this pull request Nov 5, 2026
Upstream's 25.12.19 with three patches:

- **Dev-only dependencies:** its JavaScript, TypeScript, Go and gRPC
dependencies, and its npm and node extensions, become `dev_dependency`.
flatc and the Swift runtime use none of them, and gRPC brought a
rules_foreign_cc that doesn't load under Bazel 9, which every consumer
had to override.
- **No Foundation on WASI** (google/flatbuffers#9461).
- **The Swift BUILD glob's missing `Vectors/`** (upstream #8875, merged;
not in a release yet).

As a version, it takes the place of the root-only
`single_version_override` with two patches (and rules_foreign_cc's) that
every isomer consumer repeated. Built from a local checkout of this
entry: isomer's renderer and Foundation targets, and the examples' web
and Android Storybooks.

Co-authored-by: Claude <344224626+logan-shire-claude[bot]@users.noreply.github.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant