Git Product home page Git Product logo

winapi-kmd-rs's Introduction

Windows Kernel-Mode Drivers written in Rust

Join the chat at https://gitter.im/pravic/winapi-kmd-rs

This library is just a proof-of-concept of the windows kernel-mode drivers, which can be written in Rust programming language.

It contains the types, constants and bindings for the Windows Driver Kit with target OS starting from Windows XP (x86/x64).

Getting started

To compile you need the following:

  • Nightly Rust with MSVC ABI starting from 2016-04-12 (?), which supports "is-like-msvc" target flavor.
  • MSVC itself, either VS 2015 or just MSVC Build Tools.
  • Rust environment for the Windows drivers: kmd-env-rs.

As workaround you can compile drivers as #[crate_type="staticlib"] and link them manually (see examples/03.urandom/build.cmd).

Setting up:

git clone https://github.com/pravic/kmd-env-rs .
git submodule init
git submodule update --recursive

Set the nightly-msvc Rust toolchain for this repository:

rustup override add nightly-i686-msvc

Try to compile example:

cd km\examples\01.minimal\
cargo build --release

By default, it compiles to x86 mode. If you need x64, either change kmd-env-rs/.cargo/config as following:

[build]
target = "x86_64-sys-windows-msvc"
...

or use RUST_TARGET_PATH:

set RUST_TARGET_PATH=C:/path/to/kmd-env-rs/.cargo`
cargo build --release --target i686-sys-windows-msvc
cargo build --release --target x86_64-sys-windows-msvc

Examples

See examples folder with a driver samples and screenshots.

Reference documentation.

Acknowledges

In memory of Four-F - the author of tutorials about kernel mode drivers development in assembly language (2002-2005).

winapi-kmd-rs's People

Contributors

gitter-badger avatar pravic avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.