-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Red Knot Playground #12681
base: main
Are you sure you want to change the base?
Red Knot Playground #12681
Conversation
90cf86e
to
0bf44b7
Compare
1fa1770
to
f2582fd
Compare
CodSpeed Performance ReportMerging #12681 will not alter performanceComparing Summary
|
|
e73aa07
to
4d4c5c8
Compare
4d4c5c8
to
faf316b
Compare
.with_writer( | ||
// To avoide trace events in the browser from showing their | ||
// JS backtrace, which is very annoying, in my opinion | ||
MakeConsoleWriter::default().map_trace_level_to(tracing::Level::TRACE), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a URl param to determine the log level: ?tracing=debug
Hey! Any updates about this? Do we have any sort of playground for red knot at the moment? |
No, there's no update. This is blocked on adding WASM support to salsa. See https://salsa.zulipchat.com/#narrow/stream/333573-Contributing-to-Salsa/topic/WASM.20support |
Summary
This PR adds a playground for Red Knot
Screencast.from.2024-08-14.10-33-54.webm
Sharing does work 😆 I just forgot to start wrangler.
It supports:
Future extensions:
pyproject.toml
would just be another file.Blockers
Salsa uses
catch_unwind
to break cycles, which Red Knot uses extensively when inferring types in the standard library.However, WASM (at least
wasm32-unknown-unknown
) doesn't supportcatch_unwind
today, so the playground always crashes when the type inference encounters a cycle.I created a discussion in the salsa zulip to see if it would be possible to not use catch unwind to break cycles.
Rust tracking issue for WASM catch unwind support
I tried to build the WASM with the nightly compiler option but ran into problems because wasm-bindgen doesn't support WASM-exceptions. We could try to write the binding code by hand.
Another alternative is to use
wasm32-unknown-emscripten
but it's rather painful to build