enable both FASTWAVE_PLATFORM values in Rust Analyzer
This commit is contained in:
parent
be5d33e5c1
commit
84700cf61b
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -7,3 +7,4 @@ frontend_dist/_api
|
|||
frontend_dist/index.html
|
||||
mzoon
|
||||
tauri
|
||||
!.vscode
|
||||
|
|
|
@ -42,6 +42,9 @@ run_task = { fork = true, parallel = true, name = [
|
|||
description = "Compile in the release mode and create installation packages"
|
||||
dependencies = ["tauri_build", "show_release_paths"]
|
||||
|
||||
# @TODO Write task `bundle_browser` once we know whether we need only the frontend
|
||||
# or also the backend side (Moon server)
|
||||
|
||||
# @TODO: Format also Typescript and CSS
|
||||
[tasks.format]
|
||||
description = "Format code"
|
||||
|
|
|
@ -16,7 +16,8 @@ macro_rules! instruction {
|
|||
// }
|
||||
|
||||
fn main() {
|
||||
let default_platform = "BROWSER";
|
||||
let default_platform = "TAURI";
|
||||
let platform = env::var("FASTWAVE_PLATFORM").unwrap_or_else(|_| default_platform.to_owned());
|
||||
instruction!("cargo:rustc-cfg=FASTWAVE_PLATFORM=\"{platform}\"");
|
||||
instruction!("cargo:rerun-if-env-changed=FASTWAVE_PLATFORM");
|
||||
}
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
// @TODO maybe rewrite `FASTWAVE_PLATFORM` to features once it's possible to set them through env vars:
|
||||
// https://github.com/rust-lang/cargo/issues/4829
|
||||
|
||||
// NOTE: `FASTWAVE_PLATFORM` is set in `Makefile.toml` tasks and then in `build.rs`
|
||||
|
||||
#[cfg(FASTWAVE_PLATFORM = "TAURI")]
|
||||
mod tauri;
|
||||
#[cfg(FASTWAVE_PLATFORM = "TAURI")]
|
||||
|
|
Loading…
Reference in a new issue