Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: swiftlang/swift-foundation
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: kateinoigakukun/swift-foundation
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: yt/wasi-support
Choose a head ref
  • 6 commits
  • 11 files changed
  • 2 contributors

Commits on Aug 8, 2024

  1. FoundationMacros: use cross-compilation to build for host

    Use `ExternalProject` to switch FoundationMacros to cross-compilation.
    This allows us to build the macros for the right OS/architecture when
    cross-compiling Foundation for other environments.
    compnerd authored and kateinoigakukun committed Aug 8, 2024
    Configuration menu
    Copy the full SHA
    51fc159 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    1c654c6 View commit details
    Browse the repository at this point in the history
  3. Use POSIXErrorCode instead of direct errno E constants from libc

    wasi-libc's E constants cannot be imported directly by ClangImporter,
    so we should use `POSIXErrorCode` from Swift instead.
    kateinoigakukun committed Aug 8, 2024
    Configuration menu
    Copy the full SHA
    2de066d View commit details
    Browse the repository at this point in the history
  4. 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.
    kateinoigakukun committed Aug 8, 2024
    Configuration menu
    Copy the full SHA
    6852de6 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    835e7a8 View commit details
    Browse the repository at this point in the history
  6. [wasm] Fall back to a default chunk size when st_blksize is not ava…

    …ilable
    
    The `st_blksize` field in `stat` struct is not provided by WASI, so we
    fall back to a default chunk size 4KB, which is a common page size.
    kateinoigakukun committed Aug 8, 2024
    Configuration menu
    Copy the full SHA
    968a3fb View commit details
    Browse the repository at this point in the history
Loading