-
Notifications
You must be signed in to change notification settings - Fork 50
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
Wasm-pack build error when use winnow debug feature #430
Comments
If possible, I can provide support. @epage |
If its just is-terminal, an MSRV bump will make that dependency go away. I haven't settled on an MSRV policy yet for this package but wanted a bit wider of a window since people were used to that with nom. We are now 5 releases past 1.70, so maybe its ok? I'm also curious why you are wanting to support |
Currently, I have used winnow to develop a parsing engine for a domain-specific language (DSL). The DSL parsing scripts are authored within a web page, and when I need to understand the entire parsing process to pinpoint and troubleshoot issues, winnow's trace functionality effectively helps me display this information on the webpage itself. I no longer need to repeatedly debug the Rust program; instead, I can directly view verbose tracing output to resolve problems. So, if winnow's trace capability could be enhanced such that it collects tracing information at specific points without necessarily outputting to the terminal, and instead relays this information back to JavaScript through WebAssembly (WASM), the web page would then be able to display the verbose trace output. |
Is this a "development" page where the traces being there, but disabled, is fine? Or is this where you compile two different instances of the parser, one with debug and one without, and switch between them? |
Yes, in the binary file compiled by Rust, the winnow debug feature is disabled for the service running on the real server. However, in the compiled wasm, the winnow debug feature is enabled. |
I'm hesitant. This was originally designed to just be for quick, one-off debugging. To expose this for use cases like this would require
Thats a large API surface for what feels like a fairly small use case that we then would be striving to maintain compatibility on. Maybe an approach to take is to allow you to experiment on such a design behind a EDIT: I wish we had language-level registration system... |
Can you provide some examples or ideas for the registration system here. Or provide a reference |
I don't remember enough of the details but there has been talk along these lines for async runtime registration. I wonder if |
Please complete the following tasks
rust version
rustc 1.74.0 (79e9716c9 2023-11-13)
winnow version
0.5.34
Minimal reproducible code
I hope to use debug in wasm to debug and output information. Currently, using the debug feature will result in errors. Can we collect trace information somewhere, not necessarily at the terminal
cargo tree
Steps to reproduce the bug with the above code
wasm-pack build --target bundler
Actual Behaviour
Expected Behaviour
Expected build ok.
Additional Context
No response
The text was updated successfully, but these errors were encountered: