Scala 3 Compiler Plugins embedded in browser with WASM

Hello,

We are currently building an educational tool where students can write Scala 3 code in a browser window to solve exercises but with some restrictions: for example, if we want students to implement data structures and algorithms by themselves and not import them straight away, we have made compiler plugins that detect such code. This already works if the student is working in their own IDE and submits the code to a compile and automatic grader server where the plugin actually resides.

Now, we want to implement this in a browser where the compiler immediately underlines the forbidden code. This already works in the IDE as the language server can show error messages from the compiler plugin even when just writing the code without compiling.

We would greatly appreciate suggestions for workflows around this issue. Thanks!

1 Like

Why use a compiler plugin and not Tasty Reader?

if you are adventurous you could fork GitHub - scalacenter/scastie: An interactive playground for Scala · GitHub

but you seem to be asking about WASM, are you already compiling code directly in the browser (rather than sending to the server)?

1 Like

I think a vscode in the browser with metal is better.