Skip to content
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

Emscripten support #301

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Emscripten support #301

wants to merge 1 commit into from

Conversation

xzfc
Copy link
Collaborator

@xzfc xzfc commented Sep 22, 2022

The target wasm32-unknown-emscripten is considered both wasm32 and unix, so the current master branch does not compile with multiple definition errors. This PR fixes this. Some of the tests checking file mtimes and symlinks still fail on Emscripten, this could be addressed later.

Relies on alexcrichton/filetime#88.

Copy link
Owner

@alexcrichton alexcrichton left a comment

Choose a reason for hiding this comment

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

I'm a bit worried about the growth of the usage of #[cfg] here, while windows/unix is pretty simple adding windows/unix/wasm/not-emscripten is getting a bit much. Would you be willing to integrate the cfg-if crate to clean up these definitions?

Copy link
Owner

@alexcrichton alexcrichton left a comment

Choose a reason for hiding this comment

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

Thanks!

@atilag
Copy link

atilag commented Sep 11, 2023

I'm trying to port a project to wasm32-unknown-emscripten that has this crate as a transient dependency. Willing to take over this and finish the emscripten port just in case @xzfc or @alexcrichton don't have the time to do it :)

@atilag
Copy link

atilag commented Sep 11, 2023

I've been taking a look at the PR, and it's becoming challenging to read between different if #[cfg()] / else. For short functions it's not a problem, though. Cognitive Complexity increases significantly with that extra indentation level :)

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