From 67915087a276bfb2733404531d848a7504f51d7f Mon Sep 17 00:00:00 2001 From: Yu Chen Date: Thu, 14 Jul 2022 09:37:06 +0800 Subject: [PATCH] support rust-analyzer for board_qemu features --- .vscode/settings.json | 7 +++++-- easy-fs-fuse/Cargo.toml | 6 +++++- easy-fs/Cargo.toml | 4 ++++ user/Cargo.toml | 4 ++++ 4 files changed, 18 insertions(+), 3 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 11de11112..bf81ab539 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -6,5 +6,8 @@ "rust.all_targets": false, // For Rust Analyzer plugin users: "rust-analyzer.cargo.target": "riscv64gc-unknown-none-elf", - "rust-analyzer.checkOnSave.allTargets": false -} + "rust-analyzer.checkOnSave.allTargets": false, + "rust-analyzer.cargo.features": [ + "board_qemu" + ] +} \ No newline at end of file diff --git a/easy-fs-fuse/Cargo.toml b/easy-fs-fuse/Cargo.toml index ee0ef9718..0527e9b88 100644 --- a/easy-fs-fuse/Cargo.toml +++ b/easy-fs-fuse/Cargo.toml @@ -9,4 +9,8 @@ edition = "2018" [dependencies] clap = "2.33.3" easy-fs = { path = "../easy-fs" } -rand = "0.8.0" \ No newline at end of file +rand = "0.8.0" + +[features] +board_qemu = [] +board_k210 = [] \ No newline at end of file diff --git a/easy-fs/Cargo.toml b/easy-fs/Cargo.toml index c9690776c..7a2f38ed3 100644 --- a/easy-fs/Cargo.toml +++ b/easy-fs/Cargo.toml @@ -12,3 +12,7 @@ lazy_static = { version = "1.4.0", features = ["spin_no_std"] } [profile.release] debug = true + +[features] +board_qemu = [] +board_k210 = [] \ No newline at end of file diff --git a/user/Cargo.toml b/user/Cargo.toml index 542a624ab..18634c3c0 100644 --- a/user/Cargo.toml +++ b/user/Cargo.toml @@ -13,3 +13,7 @@ riscv = { git = "https://github.com/rcore-os/riscv", features = ["inline-asm"] } [profile.release] debug = true + +[features] +board_qemu = [] +board_k210 = [] \ No newline at end of file