webview_deno: local.ts example doesn't work on macos
$ git clone git@github.com:webview/webview_deno.git
Cloning into 'webview_deno'...
cd eremote: Enumerating objects: 999, done.
remote: Counting objects: 100% (303/303), done.
remote: Compressing objects: 100% (217/217), done.
remote: Total 999 (delta 163), reused 190 (delta 71), pack-reused 696
Receiving objects: 100% (999/999), 920.60 KiB | 5.86 MiB/s, done.
Resolving deltas: 100% (530/530), done.
^R
cd Brandons-MacBook-Air:Desktop brandonros 2022-01-26 22:48:59 $ cd webview_deno/
Brandons-MacBook-Air:webview_deno brandonros 2022-01-26 22:49:04 $ make build
cargo build
Updating crates.io index
Downloaded once_cell v1.9.0
Downloaded 1 crate (30.7 KB) in 0.79s
Compiling pkg-config v0.3.18
Compiling cc v1.0.58
Compiling once_cell v1.9.0
Compiling webview-official-sys v0.1.2
Compiling webview_deno v0.7.0-pre.0 (/Users/brandonros/Desktop/webview_deno)
Finished dev [unoptimized + debuginfo] target(s) in 1m 15s
Brandons-MacBook-Air:webview_deno brandonros 2022-01-26 22:50:25 $ PLUGIN_URL=target/debug/ deno run --unstable -A examples/local.ts
Check file:///Users/brandonros/Desktop/webview_deno/examples/local.ts
Download target/debug/libwebview_deno.dylib
$ deno --version
deno 1.18.0 (release, aarch64-apple-darwin)
v8 9.8.177.6
typescript 4.5.2

just shows in the dock, click it and no window to be found anywhere
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 24 (8 by maintainers)
Commits related to this issue
- Fix issue https://github.com/webview/webview_deno/issues/100 — committed to hoangpq/deno_webview by hoangpq 2 years ago
Hi @eliassjogreen
I created a PR to fix the issue related to WebView on Darwin https://github.com/webview/webview_deno/pull/103
First: Must explicitly call set_size method on webview_sys
I’m not sure about this one
return encoder.encode(value + "\n");in other platform but we need to remove ‘\n’ in Darwin so I do platform check for backward compatible.Works great!
This issue should be closed now with #103. Thanks @hoangpq!
FYI
make examplespawns a webview instance inside a web worker (another thread). We need to update the example to run the webview instance on the main thread. This is not a Deno FFI bug.I can’t find
webview-official-sysdependency on GitHub.https://docs.rs/crate/webview-official-sys/0.1.2/source/Cargo.toml
webview_createseems to return UnsafePointer find.webview_runseems to block but not create window but also not log an error/throw an exception. I will try to keep digging but I might hit brick wall as it is above my head.Edit: found it, in here: https://github.com/webview/webview_rust/
The sample here works fine: