question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Lack of intellisense when target_arch other than current machine's

See original GitHub issue

Environment

  • 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

obraz

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::Objjs_sys::Object JsValue::fr ✔️ JsValue::from_bool and many more This is a weird one: js_sys::Reflect::se ✔️ js_sys::Reflect::set Reflect::seReflect::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:closed
  • Created 3 years ago
  • Reactions:5
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
TimonPostcommented, Feb 4, 2022

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.

3reactions
Miha-Rozinacommented, Jul 14, 2021

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found