Skip to content

feat(p2-shim): support symlink for browser in-memory filesystem - #2057

Merged
vados-cosmonic merged 3 commits into
bytecodealliance:mainfrom
eduardomourar:feat/p2-shim-browser-support-symlink
Sep 7, 2026
Merged

feat(p2-shim): support symlink for browser in-memory filesystem#2057
vados-cosmonic merged 3 commits into
bytecodealliance:mainfrom
eduardomourar:feat/p2-shim-browser-support-symlink

Conversation

@eduardomourar

Copy link
Copy Markdown
Contributor

Implements symlink-at/readlink-at in InMemoryFilesystemAdapter, which previously threw "unsupported" for both. Path resolution (open-at, stat-at, set-times-at, link-at, metadata-hash-at) now follows symlinks per-segment and honors path flags.symlink-follow instead of ignoring it, with cycle detection (loop error) and directory-listing/stat type reporting updated to recognize symbolic-link entries.

Symlink targets are always relative, resolved against the directory containing the link — this sandboxed filesystem has no host-absolute root, matching existing path-resolution and the Node backend's behavior.

@eduardomourar
eduardomourar force-pushed the feat/p2-shim-browser-support-symlink branch from 1641a93 to 6e4b44c Compare September 6, 2026 13:42
@eduardomourar eduardomourar changed the title feat(preview2-shim): support symlink for browser in-memory filesystem feat(p2-shim): support symlink for browser in-memory filesystem Sep 6, 2026
@eduardomourar
eduardomourar force-pushed the feat/p2-shim-browser-support-symlink branch from 6e4b44c to 3743f5c Compare September 6, 2026 14:14
Resolve lookups, parent paths, and creation with one bounded directory stack. Keep dangling links intact, enforce exclusive creation, allow parent-relative targets within the descriptor capability, and reject preset absolute targets. Apply legacy CWD handling only to the original lookup path.

Add concurrent regression tests for creation, path boundaries, mutations, and symlink limits.
Compile one component and run its filesystem operations in the browser. Cover normal symlink behavior and the creation, relative-path, CWD, and absolute-target regressions with concurrent result assertions while sharing compilation and browser setup.
@vados-cosmonic
vados-cosmonic added this pull request to the merge queue Sep 7, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Sep 7, 2026
@vados-cosmonic
vados-cosmonic merged commit 408c688 into bytecodealliance:main Sep 7, 2026
61 checks passed
@jco-release-bot

Copy link
Copy Markdown
Collaborator

🎉 The code in this PR was made available in the following release:
https://github.com/bytecodealliance/jco/releases/tag/preview2-shim-v0.24.0

@eduardomourar
eduardomourar deleted the feat/p2-shim-browser-support-symlink branch September 7, 2026 10:15
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.

3 participants