Lack of intellisense when target_arch other than current machine's
See original GitHub issueEnvironment
- IntelliJ Rust plugin version: 0.2.118.2157-201
- IDE name and version: CLion 2020.1 EAP Build #CL-201.6251.14, built on March 11, 2020 Experimental macro resolution is enabled!
Problem description
I’d like to have code completion for js_sys::Object
, and other conditionally disabled types somehow. Is there an option to set the target_arch
somehow to something different than the current machine’s?
js_
✔️ js_sys
js_sys::Re
✔️ js_sys::Reflect
Even if the above are completed, then on ctrl+q
they have no documentation, although ctrl+q
on js_sys
does show docs
Object::
❌ empty nothing
js_sys::Obj
❌ js_sys::Object
JsValue::fr
✔️ JsValue::from_bool
and many more
This is a weird one:
js_sys::Reflect::se
✔️ js_sys::Reflect::set
Reflect::se
❌ Reflect::set
Steps to reproduce
#[cfg(target_arch = "wasm32")]
use {
wasm_bindgen::{
prelude::*,
JsValue
},
js_sys::{
Object,
Reflect
},
}
#[cfg(target_arch = "wasm32")]
#[cfg_attr(target_arch= "wasm32", wasm_bindgen)]
impl SomeStruct {
#[wasm_bindgen]
pub fn take(self) -> Object {
let obj = Object::new();
}
}
This has the same effect:
#[cfg(target_arch = "wasm32")]
#[wasm_bindgen]
impl SomeStruct {
...
}
Issue Analytics
- State:
- Created 3 years ago
- Reactions:5
- Comments:8 (3 by maintainers)
Top Results From Across the Web
Objective Assessment of Endovascular Navigation ... - NCBI
The field of endovascular intervention suffers from a lack of ... Besides SVMs, the use of other machine learning approaches (e.g., ...
Read more >C++ vs Rust Cheat Sheet – MaulingMonkey
Fewer gaps than other languages I've seen used in gamedev, but gaps nonetheless. Slow build times (on par with C) and the need...
Read more >CLion 2019.1 is Here with Embedded Development ...
The idea is that CLion can now reuse the symbols built already for some other recently opened projects, as long as they fit...
Read more >07a589a9d8a1424574fcb154de...
This assumes you have already booted your device -with a version of Fuchsia that contains the most recent version of all other -packages....
Read more >Bug listing with status RESOLVED with resolution OBSOLETE ...
... Bug:38163 - "net-dialup/vocp - answering machine, text-to-speech, pager, ... different than xterm with same font" status:RESOLVED resolution:OBSOLETE ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
This issue seems still relevant. It would be nice to just be able to pass a target to rust plugin instead of changing the build target.
While the
.cargo/config
approach works, it does mean that anytime you want to change the target, you have to rebuild the whole project. It would still be great if we could just tell CLion for which target it should show intellisense without the need to fully rebuild the project.