Skip to content

wasm: Enable filesystem APIs in libcxx #77747

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

kateinoigakukun
Copy link
Member

As of a recent fix included in LLVM 17 1 and wasi-libc fix 2, we can enable LIBCXX_ENABLE_FILESYSTEM in libcxx build for WebAssembly/WASI. This allows us to use <filesystem>, <fstream>, etc in C++ code.

Footnotes

  1. https://github.com/llvm/llvm-project/commit/66a562d22e708ba40b8443b58e504ac3f983ba59

  2. https://github.com/WebAssembly/wasi-libc/pull/463

As of a recent fix included in LLVM 17[1] and wasi-libc fix[2], we can
enable `LIBCXX_ENABLE_FILESYSTEM` in libcxx build for WebAssembly/WASI.
This allows us to use `<filesystem>`, `<fstream>`, etc in C++ code.

[1]: llvm/llvm-project@66a562d
[2]: WebAssembly/wasi-libc#463
@kateinoigakukun
Copy link
Member Author

@swift-ci test WebAssembly

@kateinoigakukun
Copy link
Member Author

@swift-ci smoke test

@kateinoigakukun kateinoigakukun marked this pull request as ready for review November 21, 2024 10:42
@kateinoigakukun kateinoigakukun merged commit db33b2b into swiftlang:main Nov 21, 2024
4 checks passed
@kateinoigakukun kateinoigakukun deleted the yt/enable-libcxx-filesystem branch November 21, 2024 23:06
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.

1 participant