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

feat: support wasm build #673

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

Conversation

underfin
Copy link

We are using notify as watcher and build it to wasm32-wasip2 and run it at https://stackblitz.com/.

But when using notify-debouncer-full to instead of notify, it can't build because the get_file_id is not implement at wasm. The std::os::wasi::fs::MetadataExt is implement at nightly rust, the stable version hasn't it. So here using NoCache for wasm to avoid the issue.

I try to add a build wasm32-wasip2 ci, but the rust toolchain version is 1.77.2, it hasn't support the wasm32-wasip2 target.It need to bump rust toolchain at first. If you approved it, please ping me i will upgrade it at first.

Thank your excellent work!

@dfaust
Copy link
Member

dfaust commented Feb 19, 2025

I try to add a build wasm32-wasip2 ci, but the rust toolchain version is 1.77.2, it hasn't support the wasm32-wasip2 target.It need to bump rust toolchain at first. If you approved it, please ping me i will upgrade it at first.

The CI setup for notify is totally broken at the moment. But ideally, it would run for multiple toolchains, regardless of the contents of the rust-toolchain.toml file. We want to run the pipelines for the nightly toolchain as well. If you want, you can add a wasm job.

I have never worked with wasi and I have no idea how notify should handle a wasi environment. How FS event notification even works there. Would it be possible to implement get_file_id for wasi?

@underfin
Copy link
Author

How FS event notification even works there

The wasi implemented the basic std::fs relate API, it worked fine at https://stackblitz.com/.

Would it be possible to implement get_file_id for wasi?

Yeah. The std::os::wasi::fs::MetadataExt is implement at nightly rust, the stable version hasn't it. If it move into stable version we could implement it.

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