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

Support Windows kernel mode for driver development #59994

Open
5 tasks
retep998 opened this issue Apr 15, 2019 · 7 comments
Open
5 tasks

Support Windows kernel mode for driver development #59994

retep998 opened this issue Apr 15, 2019 · 7 comments
Labels
A-linkage Area: linking into static, shared libraries and binaries C-feature-request Category: A feature request, i.e: not implemented / a PR. O-windows Operating system: Windows O-windows-msvc Toolchain: MSVC, Operating system: Windows T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.

Comments

@retep998
Copy link
Member

retep998 commented Apr 15, 2019

Several people have approached me about this, and I definitely think this is an area Rust should try to support.

  • Add targets for Windows kernel mode.
  • Update cc to be able to locate kernel mode libraries instead of user mode libraries for those targets.
  • Update winapi to link to kernel mode libraries instead of user mode libraries for those targets.
  • ? libc ?
  • ??? std ???
@retep998 retep998 added A-linkage Area: linking into static, shared libraries and binaries O-windows Operating system: Windows T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. O-windows-msvc Toolchain: MSVC, Operating system: Windows C-feature-request Category: A feature request, i.e: not implemented / a PR. labels Apr 15, 2019
@bearmate
Copy link

Would this provide a panic=abort msvc-compatible libcore (and liballoc), making no_std windows development possible?

I could really use this for trying to convince my company to provide rust-bindings for our library.

@woodgear
Copy link

in fact we have use rust to write windows driver and deploy it in product env .here is example how we did that win_driver_example

@retep998
Copy link
Member Author

@bearmate You already can do no_std development on Windows and use panic=abort.

@bearmate
Copy link

But as of now not with stable rust right? I tried some time ago, but had linker problems (#54137) and suspected that it is not possible, because of the pre-built libcore with unwinding enabled.

@netaneld122
Copy link

netaneld122 commented Apr 8, 2020

I believe that as long as this issue isn't properly handled in the Rust core libs, it's not safe to compile Rust Windows drivers (specifically for x86_32 systems).

@cdmistman
Copy link

with the May security patch of Windows last month, Windows is starting to drop 32-bit support, so I don't think 32-bit should be an issue anymore. Of course, it's up to the core team to decide whether this will be a roadblock or not...

@wwylele
Copy link
Contributor

wwylele commented Apr 5, 2023

Has anything changed over the years that would make this easier to implement?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-linkage Area: linking into static, shared libraries and binaries C-feature-request Category: A feature request, i.e: not implemented / a PR. O-windows Operating system: Windows O-windows-msvc Toolchain: MSVC, Operating system: Windows T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

6 participants