Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't run basic example on MacOS #30

Closed
kifirkin opened this issue Feb 3, 2021 · 3 comments
Closed

Can't run basic example on MacOS #30

kifirkin opened this issue Feb 3, 2021 · 3 comments

Comments

@kifirkin
Copy link

kifirkin commented Feb 3, 2021

I'm on macOS Big Sur 11.1

I've just cloned Doryen git repo and run cargo run --example basic. I'm using stable Rust, not nightly

Here is an error:

error[E0282]: type annotations needed
   --> /Users/kifir/.cargo/registry/src/github.com-1ecc6299db9ec823/cocoa-0.15.0/src/appkit.rs:526:9
    |
526 |         msg_send![self, releaseGlobally];
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ consider giving `result` a type
    |
    = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0282]: type annotations needed
    --> /Users/kifir/.cargo/registry/src/github.com-1ecc6299db9ec823/cocoa-0.15.0/src/appkit.rs:2849:9
     |
2849 |         msg_send![self, setBezelStyle:style];
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ consider giving `result` a type
     |
     = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0282]: type annotations needed
    --> /Users/kifir/.cargo/registry/src/github.com-1ecc6299db9ec823/cocoa-0.15.0/src/appkit.rs:3454:9
     |
3454 |         msg_send![self, setEditable:editable];
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ consider giving `result` a type
     |
     = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0282]: type annotations needed
    --> /Users/kifir/.cargo/registry/src/github.com-1ecc6299db9ec823/cocoa-0.15.0/src/appkit.rs:3457:9
     |
3457 |         msg_send![self, setStringValue:label];
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ consider giving `result` a type
     |
     = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error: aborting due to 4 previous errors

For more information about this error, try `rustc --explain E0282`.
error: could not compile `cocoa`

To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error: build failed

Also there is an error in browser console when I run cargo web start --example basic:

[Error] Encountered a panic!
	__cargo_web_snippet_dc2fd915bd92f9e9c6a3bd15174f1414eee3dbaf (basic.js:766)
	wasm-stub
	<?>.wasm-function[_ZN6stdweb7webcore14initialization10initialize28_$u7b$$u7b$closure$u7d$$u7d$7snippet17hd7a35bcdf1070f6eE]
	<?>.wasm-function[_ZN6stdweb7webcore14initialization10initialize28_$u7b$$u7b$closure$u7d$$u7d$17he22ad472c30d7db1E]
	<?>.wasm-function[_ZN3std9panicking20rust_panic_with_hook17h123718ba3bf480afE]
	<?>.wasm-function[_ZN3std9panicking19begin_panic_handler28_$u7b$$u7b$closure$u7d$$u7d$17hf393a82e58397bd2E]
	<?>.wasm-function[_ZN3std10sys_common9backtrace26__rust_end_short_backtrace17h2ff2cfc953878925E]
	<?>.wasm-function[rust_begin_unwind]
	<?>.wasm-function[_ZN4core9panicking9panic_fmt17h285dc015a87be5a4E]
	<?>.wasm-function[_ZN4core9panicking5panic17h0abe4e7a620ae568E]
	<?>.wasm-function[_ZN154_$LT$stdweb..webcore..serialization..SerializedValue$u20$as$u20$core..convert..From$LT$stdweb..webcore..serialization..SerializedUntaggedReference$GT$$GT$4from17h1b90a50ca1020b2dE]
	<?>.wasm-function[_ZN50_$LT$T$u20$as$u20$core..convert..Into$LT$U$GT$$GT$4into17h8342543359c53330E]
	<?>.wasm-function[_ZN97_$LT$stdweb..webcore..value..Reference$u20$as$u20$stdweb..webcore..serialization..JsSerialize$GT$8_into_js17h290f2e87c5477b73E]
	<?>.wasm-function[_ZN98_$LT$stdweb..webapi..document..Document$u20$as$u20$stdweb..webcore..serialization..JsSerialize$GT$8_into_js17h454a0bdc37d02575E]
	<?>.wasm-function[_ZN69_$LT$$RF$T$u20$as$u20$stdweb..webcore..serialization..JsSerialize$GT$8_into_js17h8d859425e2552faeE]
	<?>.wasm-function[_ZN179_$LT$stdweb..webcore..newtype..Newtype$LT$$LP$stdweb..webcore..serialization..NonFunctionTag$C$$LP$$RP$$RP$$C$T$GT$$u20$as$u20$stdweb..webcore..serialization..JsSerializeOwned$GT$13into_js_owned17hd4b8747f02240bf4E]
	<?>.wasm-function[_ZN6stdweb6webapi8document8Document14create_element17h13f8a5a9624b1909E]
	<?>.wasm-function[_ZN7uni_app3sys3App3new17h22a6b588d1de7c12E]
	<?>.wasm-function[_ZN9doryen_rs3app3App3new17hdb18acbf87669759E]
	<?>.wasm-function[_ZN5basic4main17h97848a66c5173674E]
	<?>.wasm-function[_ZN4core3ops8function6FnOnce9call_once17h95aace93dba0b342E]
	<?>.wasm-function[_ZN3std10sys_common9backtrace28__rust_begin_short_backtrace17h21ca42516ce6e722E]
	<?>.wasm-function[_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h4f059f43d05dd092E]
	<?>.wasm-function[_ZN3std2rt19lang_start_internal17h1ad6338b95de9507E]
	<?>.wasm-function[_ZN3std2rt10lang_start17h07ffb5252c2c9c60E]
	<?>.wasm-function[main]
	wasm-stub
	main
	initialize (basic.js:839)
	(анонимная функция) (basic.js:41)
	promiseReactionJob
[Error] Panic location: – "/Users/kifir/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/src/rust/library/core/src/mem/mod.rs:659"
	__cargo_web_snippet_72fc447820458c720c68d0d8e078ede631edd723 (basic.js:658)
	wasm-stub
	<?>.wasm-function[_ZN6stdweb7webcore14initialization10initialize28_$u7b$$u7b$closure$u7d$$u7d$7snippet17h74b254a3f62b22beE]
	<?>.wasm-function[_ZN6stdweb7webcore14initialization10initialize28_$u7b$$u7b$closure$u7d$$u7d$17he22ad472c30d7db1E]
	<?>.wasm-function[_ZN3std9panicking20rust_panic_with_hook17h123718ba3bf480afE]
	<?>.wasm-function[_ZN3std9panicking19begin_panic_handler28_$u7b$$u7b$closure$u7d$$u7d$17hf393a82e58397bd2E]
	<?>.wasm-function[_ZN3std10sys_common9backtrace26__rust_end_short_backtrace17h2ff2cfc953878925E]
	<?>.wasm-function[rust_begin_unwind]
	<?>.wasm-function[_ZN4core9panicking9panic_fmt17h285dc015a87be5a4E]
	<?>.wasm-function[_ZN4core9panicking5panic17h0abe4e7a620ae568E]
	<?>.wasm-function[_ZN154_$LT$stdweb..webcore..serialization..SerializedValue$u20$as$u20$core..convert..From$LT$stdweb..webcore..serialization..SerializedUntaggedReference$GT$$GT$4from17h1b90a50ca1020b2dE]
	<?>.wasm-function[_ZN50_$LT$T$u20$as$u20$core..convert..Into$LT$U$GT$$GT$4into17h8342543359c53330E]
	<?>.wasm-function[_ZN97_$LT$stdweb..webcore..value..Reference$u20$as$u20$stdweb..webcore..serialization..JsSerialize$GT$8_into_js17h290f2e87c5477b73E]
	<?>.wasm-function[_ZN98_$LT$stdweb..webapi..document..Document$u20$as$u20$stdweb..webcore..serialization..JsSerialize$GT$8_into_js17h454a0bdc37d02575E]
	<?>.wasm-function[_ZN69_$LT$$RF$T$u20$as$u20$stdweb..webcore..serialization..JsSerialize$GT$8_into_js17h8d859425e2552faeE]
	<?>.wasm-function[_ZN179_$LT$stdweb..webcore..newtype..Newtype$LT$$LP$stdweb..webcore..serialization..NonFunctionTag$C$$LP$$RP$$RP$$C$T$GT$$u20$as$u20$stdweb..webcore..serialization..JsSerializeOwned$GT$13into_js_owned17hd4b8747f02240bf4E]
	<?>.wasm-function[_ZN6stdweb6webapi8document8Document14create_element17h13f8a5a9624b1909E]
	<?>.wasm-function[_ZN7uni_app3sys3App3new17h22a6b588d1de7c12E]
	<?>.wasm-function[_ZN9doryen_rs3app3App3new17hdb18acbf87669759E]
	<?>.wasm-function[_ZN5basic4main17h97848a66c5173674E]
	<?>.wasm-function[_ZN4core3ops8function6FnOnce9call_once17h95aace93dba0b342E]
	<?>.wasm-function[_ZN3std10sys_common9backtrace28__rust_begin_short_backtrace17h21ca42516ce6e722E]
	<?>.wasm-function[_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h4f059f43d05dd092E]
	<?>.wasm-function[_ZN3std2rt19lang_start_internal17h1ad6338b95de9507E]
	<?>.wasm-function[_ZN3std2rt10lang_start17h07ffb5252c2c9c60E]
	<?>.wasm-function[main]
	wasm-stub
	main
	initialize (basic.js:839)
	(анонимная функция) (basic.js:41)
	promiseReactionJob
[Log] Error loading Rust wasm module 'basic': – RuntimeError: Unreachable code should not be executed (evaluating 'Module.instance.exports.main()') — basic.js:839 (basic.js, line 46)
RuntimeError: Unreachable code should not be executed (evaluating 'Module.instance.exports.main()') — basic.js:839
[Error] Unhandled Promise Rejection: RuntimeError: Unreachable code should not be executed (evaluating 'Module.instance.exports.main()')
	(анонимная функция) (basic.js:47)
	promiseReactionJob
@jice-nospam
Copy link
Owner

jice-nospam commented Jun 12, 2021

only way to fix this is to upgrade glutin in the underlying unrust engine.

@jice-nospam
Copy link
Owner

Duplicate of #32

@jice-nospam jice-nospam marked this as a duplicate of #32 Jun 12, 2021
@kifirkin
Copy link
Author

Thanks! I'll wait for this big update

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants