Skip to content

[docs] Add onMakeDirectory and onMakeSymlink to the list of tracking delegates - #27326

Merged
sbc100 merged 1 commit into
emscripten-core:mainfrom
WebCoder49:patch-1
Jul 12, 2026
Merged

[docs] Add onMakeDirectory and onMakeSymlink to the list of tracking delegates#27326
sbc100 merged 1 commit into
emscripten-core:mainfrom
WebCoder49:patch-1

Conversation

@WebCoder49

Copy link
Copy Markdown
Contributor

This is to match the example code below that list, which contains onMakeDirectory and onMakeSymlink, while they are absent from the list above.

Reading only the list and not the example code below it, I was confused about how to track directory creation, and this pull request should resolve that confusion for others.

…es to match the example code below that list

@sbc100 sbc100 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm.

BTW, do you use the trackingDelegate? I was wondering if it had any users, and what they uses it for. Since its only available with FS_DEBUG its uses seem pretty limited.

@sbc100 sbc100 changed the title Site: Add onMakeDirectory and onMakeSymlink to the list of tracking delegates [docs] Add onMakeDirectory and onMakeSymlink to the list of tracking delegates Jul 12, 2026
@sbc100
sbc100 merged commit b1562ff into emscripten-core:main Jul 12, 2026
39 checks passed
@WebCoder49

Copy link
Copy Markdown
Contributor Author

I'm writing a code editor which uses Pyodide (an Emscripten port of the CPython interpreter) to run code. I use the trackingDelegate with Pyodide's filesystem, to then synchronise with both the editor's UI and Yjs for peer-to-peer collaboration.

@sbc100

sbc100 commented Jul 13, 2026

Copy link
Copy Markdown
Collaborator

I see, so use are using the in memory emscripen FS, but want to reflect that out to something outside (in this case the UI?) I guess that means you need to build with FS_DEBUG even in your release build? I wonder if this the best solution for you use case or if we could come up with a way to intercept arbitrary system calls / library calls?

@WebCoder49

Copy link
Copy Markdown
Contributor Author

Good question, @sbc100. It looks like Pyodide insalled via NPM defaults to the debug build anyway, so initially I didn't even notice I was running the debug build. Is there any major issue to having the debug build of Emscripten, especially if it is being used as a development environment?

@WebCoder49

Copy link
Copy Markdown
Contributor Author

It looks like the Raspberry Pi's editor which also uses Pyodide intercepts file opens at the Python level. Nevertheless, I think it may be difficult to ensure the interception is complete especially when importing C-language libraries into Python or dealing with directories.

@WebCoder49

Copy link
Copy Markdown
Contributor Author

(Sorry for taking your time; you don't have to respond.)

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.

2 participants