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.
Hi, my name’s Aaron Powell and I’m a Cloud Advocate at Microsoft. My area of specialty is front-end web dev and .NET (especially F#), but I enjoy doing silly things with technology.
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.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
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.
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.