blckngm / webview2

Rust bindings for WebView2
MIT License
73 stars 12 forks source link

Example stand-alone app #8

Closed nothingbutnetcode closed 4 years ago

nothingbutnetcode commented 4 years ago

Hi, Is there an example standalone app? I can run your examples without problem, but if I try create a new app with webview2 and winapi dependencies (copying your examples/win32.rs code), it doesn't run.

I get: error[E0599]: no function or associated item named builder found for struct webview2::Environment in the current scope --> src\main.rs:135:36 | 135 | let r = webview2::Environment::builder().build(move |env| { | ^^^^^^^ function or associated item not found in webview2::Environment

My cargo.toml:
[dependencies] webview2 = "0.1.0-beta.1" com = "0.2.0" once_cell = "1.4.1" widestring = "0.4.0" winapi = { version = "0.3.9", features = ["combaseapi", "shellapi", "winerror", "libloaderapi"] } Thanks!

blckngm commented 4 years ago

It's a new function added in master that is not released yet.

You can use EnvironmentBuilder::default instead.

nothingbutnetcode commented 4 years ago

Thanks, that works.