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

wdk-build does not work with shared folders/virtual filesystems #191

Open
kedom1337 opened this issue Jul 29, 2024 · 0 comments
Open

wdk-build does not work with shared folders/virtual filesystems #191

kedom1337 opened this issue Jul 29, 2024 · 0 comments

Comments

@kedom1337
Copy link

kedom1337 commented Jul 29, 2024

I have a somewhat unique setup where I develop on my linux host machine and build the project in a Windows virtual machine. The project is shared through a shared folder (currently using virtiofs and WinFSP but I tried SAMBA aswell). The build script specifically the function load_wdk_build_makefile right here fails when trying to build the project within that shared folder. See my other issue here for more information. It seems the problem lies with std::os::windows::fs::symlink_file or rather CreateSymbolicLinkW which it seems to be using. As already say in the other issue everything works as espected as soon as I copy the project from the shared folder to the guest machines C: drive and run the script from there.

Here is a minimal rust application which I used for debugging. Z: is the virtual file system and myproject is a simple Windows rust driver according to the instructions of this repository

use std::env;
use std::path::Path;

fn main() -> Result<(), Box<dyn std::error::Error>> {
    let root = Path::new("Z:\\myproject");
    env::set_current_dir(&root).unwrap();
    env::set_var("CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY", "Z:\\myproject");
    wdk_build::cargo_make::load_rust_driver_makefile()?;

    Ok(())
}
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

1 participant