-
Notifications
You must be signed in to change notification settings - Fork 1
Add browser support via ZenFS #4
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
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: Hexagon <[email protected]>
Co-authored-by: Hexagon <[email protected]>
|
@copilot would it be possible to implement this without the added dependency on zenfs? |
Co-authored-by: Hexagon <[email protected]>
Co-authored-by: Hexagon <[email protected]>
Co-authored-by: Hexagon <[email protected]>
Co-authored-by: Hexagon <[email protected]>
It's technically possible but would require significant custom implementation. Here are the options: Without ZenFS, we'd need to:
Why ZenFS was chosen:
Alternative approach:
Would you prefer a minimal implementation without dependencies (limited features) or keep ZenFS for full functionality? I can implement either approach based on your preference. |
Implements browser runtime support using ZenFS as suggested in issue #3. Enables filesystem operations in browsers with configurable storage backends (in-memory default, IndexedDB for persistence).
Changes
Infrastructure
@zenfs/coredependency for browser filesystem abstractionsrc/utils/browser-fs.tswith initialization and configuration APIRuntime-aware operations
stat,lstat,accessto use ZenFS in browsersreadFile,writeFilewith runtime detectionmkdir,rmdir,rm,unlink,readdir,rename,cpBrowser limitations
Operations not supported:
chmod,chown,link,open,readlink,realpath,truncate,which,FsWatcherUsage
All existing Node.js/Deno/Bun functionality preserved. Operations automatically adapt to runtime environment.
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
dl.deno.land/usr/bin/curl curl -s REDACTED(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.