Skip to content

Pointers needed on WASILibc #2313

Open
Open
@yonihemi

Description

@yonihemi

(no pun intended)

Hi!
I'm trying to get ZipFoundation to work in SwiftWasm.
Already got zlib building so we're getting there.

Now, when Swift code calls types like FILE or values like SEEK_SET which are missing, I'm assuming those can be included by tweaking https://github.com/swiftwasm/swift/blob/swiftwasm/stdlib/public/Platform/wasi.modulemap.gyb, correct?

(For example, perhaps these should do the trick:

#undef __DEFINED_FILE
#define __NEED_struct__IO_FILE
#define __need_FILE

).
On that note, I'm trying to track down the exact source of /usr/share/wasi-sysroot/share/wasm32-wasi/predefined-macros.txt included in the toolchain, (which includes #define __DEFINED_FILE, which we probably don't want) and how/if it affects the build.

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is neededquestionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions