So first off, what is Verso? Verso is a browser based on Servo, a web browser rendering engine written in Rust I believe there’re quite a lot of people having thought about using Servo but got intimidated by the complex APIs and just gave up, which frankly I was one of them, so the goal of building the Verso webview is to make it easy enough to understand and use so that people will actually start to experiment and use it Servo itself is made to be relatively easy to embed compared to other browsers, but the APIs are still way too low level and it’s quite daunting to use, you can take a look at the minimal example for running Servo with Winit at (note this is not even a fully functional example): https://github.com/servo/servo/blob/8d39d7706aee50971e848a5e31fc6bfd7ef552c1/components/servo/examples/winit_minimal.rs And compared to that, Verso’s API looks like this, which is much easier and ergonomic to use use std::env::current_exe; let versoview_path = current_exe().unwrap().parent().unwrap().join("versoview"); let controller = VersoBuilder::new() .build(versoview_path, Url::parse("https://example.com").unwrap()); https://github.com/versotile-org/verso/blob/2e853d4f3f4cb88274daa211b7a2eb3bd1517115/verso/src/main.rs It’s not to say Servo’s API is bad though, as they need to support a lot more use cases while we just need it for building applications with Tauri So let’s talk about the integration with Tauri! We choose to integrate Verso and Tauri through a new custom runtime tauri-runtime-verso for this time, this is similar to our default runtime tauri-runtime-wry. With this approach, you can easily swap out the runtime and use Tauri like what you’ll normally do: use tauri_runtime_verso::{ INVOKE_SYSTEM_SCRIPTS, VersoRuntime, set_verso_path, set_verso_resource_directory, // You need to set this to the path of the versoview executable // before creating any of the webview windows set_verso_path("../verso/target/debug/versoview"); // Set this to verso/servo's resources...
First seen: 2025-04-01 09:46
Last seen: 2025-04-01 20:47