Skip to content

Path resolution should be consistent with WASI spec #293

@yagehu

Description

@yagehu

Currently, in functions such as path_open, uvwasi first normalizes the path. For example, a path such as a/./../a/b would be normalized to a/b before calling the underlying OS syscall.

This behavior is inconsistent with the WASI documentation, which specifies that path components should be resolved one by one.

This causes seemingly simple WASI calls to behave differently on Node (uvwasi) and many other runtimes like Wasmtime, WasmEdge, etc. For example, a path_open call that tries to create a file a/. will fail on Wasmtime while it succeeds on Node.

@cjihrig has previously suggested a path forward in #269. I just want to open a dedicated issue to track this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions