Skip to content
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

FTS Support #520

Open
kateinoigakukun opened this issue Jul 26, 2024 · 1 comment · May be fixed by #522
Open

FTS Support #520

kateinoigakukun opened this issue Jul 26, 2024 · 1 comment · May be fixed by #522

Comments

@kateinoigakukun
Copy link
Contributor

wasi-libc does not include fts(3) implementation now, and it prevents us from reusing other platforms' code while porting swift-foundation to WASI.

Can we ship https://github.com/void-linux/musl-fts licensed under BSD 3-Clause as a part of wasi-libc?

The implementation is well-matured and well-used in the Alpine ecosystem. The only change we need to apply to the implementation is not to depend on fchdir by making FTS_NOCHDIR default.

kateinoigakukun added a commit to kateinoigakukun/swift-foundation that referenced this issue Jul 26, 2024
For now wasi-libc does not include fts(3) implementation, so mark
features depending on it as unsupported on WASI. Once wasi-libc includes
fts or we decide to implement and maintain our own fts-like API, we can
remove these `#if os(WASI)` guards.

wasi-libc issue tracking fts support:
WebAssembly/wasi-libc#520
kateinoigakukun added a commit to kateinoigakukun/swift-foundation that referenced this issue Jul 26, 2024
For now wasi-libc does not include fts(3) implementation, so mark
features depending on it as unsupported on WASI. Once wasi-libc includes
fts or we decide to implement and maintain our own fts-like API, we can
remove these `#if os(WASI)` guards.

wasi-libc issue tracking fts support:
WebAssembly/wasi-libc#520
@sbc100
Copy link
Member

sbc100 commented Jul 31, 2024

Since we already have some BSD-licensed parts of wasi-libc it doesn't seem unreasonable to me.

Could we include it via a submodule and upstream the FTS_NOCHDIR mod you mention?

@kateinoigakukun kateinoigakukun linked a pull request Aug 1, 2024 that will close this issue
kateinoigakukun added a commit to kateinoigakukun/swift-foundation that referenced this issue Aug 7, 2024
For now wasi-libc does not include fts(3) implementation, so mark
features depending on it as unsupported on WASI. Once wasi-libc includes
fts or we decide to implement and maintain our own fts-like API, we can
remove these `#if os(WASI)` guards.

wasi-libc issue tracking fts support:
WebAssembly/wasi-libc#520

Also, wasi-libc defines some constants in a way that ClangImporter can't
understand, so we need to grab them manually through _FoundationCShims in
function call form.
kateinoigakukun added a commit to kateinoigakukun/swift-foundation that referenced this issue Aug 8, 2024
For now wasi-libc does not include fts(3) implementation, so mark
features depending on it as unsupported on WASI. Once wasi-libc includes
fts or we decide to implement and maintain our own fts-like API, we can
remove these `#if os(WASI)` guards.

wasi-libc issue tracking fts support:
WebAssembly/wasi-libc#520

Also, wasi-libc defines some constants in a way that ClangImporter can't
understand, so we need to grab them manually through _FoundationCShims in
function call form.
kateinoigakukun added a commit to kateinoigakukun/swift-foundation that referenced this issue Aug 8, 2024
For now wasi-libc does not include fts(3) implementation, so mark
features depending on it as unsupported on WASI. Once wasi-libc includes
fts or we decide to implement and maintain our own fts-like API, we can
remove these `#if os(WASI)` guards.

wasi-libc issue tracking fts support:
WebAssembly/wasi-libc#520

Also, wasi-libc defines some constants in a way that ClangImporter can't
understand, so we need to grab them manually through _FoundationCShims in
function call form.
kateinoigakukun added a commit to kateinoigakukun/swift-foundation that referenced this issue Aug 10, 2024
For now wasi-libc does not include fts(3) implementation, so mark
features depending on it as unsupported on WASI. Once wasi-libc includes
fts or we decide to implement and maintain our own fts-like API, we can
remove these `#if os(WASI)` guards.

wasi-libc issue tracking fts support:
WebAssembly/wasi-libc#520

Also, wasi-libc defines some constants in a way that ClangImporter can't
understand, so we need to grab them manually through _FoundationCShims in
function call form.
jmschonfeld pushed a commit to apple/swift-foundation that referenced this issue Aug 13, 2024
* Port directory enumeration related code to WASI

For now wasi-libc does not include fts(3) implementation, so mark
features depending on it as unsupported on WASI. Once wasi-libc includes
fts or we decide to implement and maintain our own fts-like API, we can
remove these `#if os(WASI)` guards.

wasi-libc issue tracking fts support:
WebAssembly/wasi-libc#520

Also, wasi-libc defines some constants in a way that ClangImporter can't
understand, so we need to grab them manually through _FoundationCShims in
function call form.

* Delegate error throwing decisions to the delegate
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 a pull request may close this issue.

2 participants