DEV Community

Christian Findlay
Christian Findlay

Posted on

You Can Now Type Check Python in Your Browser - 100% Conformance

Basilisk runs in the browser now. No install, no venv, no pip, no wondering which interpreter your editor decided to resolve against. Open a tab, paste some Python, get real type errors back.

👉 https://www.basilisk-python.dev/playground/

It’s not a reduced-capability web demo with a subset of the rules bolted on. It’s the actual Rust checker compiled to WASM — same engine as the CLI, same engine behind the LSP, same inference, same answers. And it’s 100% conformant against the official Python typing conformance suite, which is the entire reason I started building this thing. If the spec says a construct means something, Basilisk agrees with the spec. In the browser. On your phone, if you want.

This makes a bunch of things easy. Arguing about what a ‘TypeVar’ bound actually does? Paste it in and settle it. Filing a bug against a checker? Send a link instead of a repro repo. Teaching typing to someone who hasn’t got Python installed yet? Send them a URL. Curious whether your favourite checker is quietly wrong about an edge case? Now there’s something to compare against that isn’t a paragraph of PEP prose.

It’s MIT. No licence terms about which editor you’re allowed to run it in, no telemetry, no “this feature requires an account.” Go break it — and if you find something the spec disagrees with, open an issue.

Check out the Basilisk website here
https://www.basilisk-python.dev/

Top comments (4)

Collapse
 
topstar_ai profile image
Luis Cruz

I was impressed by the fact that Basilisk's type checker is compiled to WASM, allowing it to run in the browser with 100% conformance to the official Python typing conformance suite. This level of conformance is particularly notable, as it ensures that the type checker's behavior aligns with the spec, making it a reliable tool for resolving disputes about type semantics. The ability to share a link to a reproducible example, rather than a repo, will undoubtedly simplify the process of filing bugs and discussing type-related issues. How do you envision Basilisk being used in conjunction with existing LSPs and IDEs to provide a more seamless type-checking experience?

Collapse
 
cfdevelop profile image
Christian Findlay

You can use the Basilisk LSP via the vscode extension right now. It does a lot more than type checking. It has refactoring, debugging, profiling and more
marketplace.visualstudio.com/items...

Collapse
 
topstar_ai profile image
Luis Cruz

Thanks, Christian! I really like the direction of Basilisk — bringing a fully conformant Python type checker to the browser through WASM is a great example of making advanced developer tooling more accessible.

The fact that the same Rust engine powers the CLI, LSP, and browser experience is especially interesting because it helps maintain consistency across different workflows. Having a reproducible playground through a simple URL can also make discussions around typing behavior, bug reports, and education much easier.

I’d love to stay connected and exchange ideas around developer tools, AI-assisted programming, and improving developer workflows. If you’re working on any future projects or exploring integrations where collaboration could be useful, I’d be happy to discuss and contribute.

Collapse
 
kristinz profile image
KristinZ

That's cool, mark. that would be a future lookback once I want to integrate similar features to my apps!