DEV Community

Discussion on: Implementing Search in Blazor WebAssembly With Lucene.NET

Collapse
 
edcharbeneau profile image
Ed Charbeneau #Blazor #StateHasChanged

Excellent article. I have used Lucene with Umbraco as well, it's quite cool to see it running in Blazor.

One quick point of clarification though. In your conclusion you write:

"I have to admit that when I started trying to build this I didn’t expect it to work. It felt like a rather crazy idea to use what is quite a complex library and compile it to WebAssembly, only to have it “just work”."

While I understand what you're saying here, I think it's worth pointing out to readers that you're not actually compiling Lucene to WebAssembly (Unless I'm mistaken). Instead, Lucene is running on a WebAssembly port of the .NET runtime. I only say this because when new developers come to Blazor they often believe their application code (c#/dlls) is compiled to .wasm when in fact it's just standard .NET libs.

Collapse
 
aaronpowell profile image
Aaron Powell

You're correct, the Mono runtime is the thing that's compiled to WASM bytecode and then bootstraps a CLR just the same as any other CLR runtime. So no, your code isn't compiled to WASM, only Mono.