Skip to content

Internals.swift cause to import all of Foundation #34

@smic

Description

@smic

Hi,

I use FoundationEssentials for the WASI target to reduce the binary size.

#if os(WASI) import FoundationEssentials #else import Foundation #endif

The problem is that Internals.swift has an import of Foundation if possible. This results in the entire foundation being packed into the binary again, so instead of 8,4 MB I get the size of 45 MB. Unfortunately, I still need FoundationEssentials. I hope that I will find a solution without Foundation in the future.

Can you please change the code to

#if canImport(Foundation) && !os(WASI) import Foundation #endif

Thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions