-
-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 8e2f959
Showing
11 changed files
with
180 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
/target | ||
**/*.rs.bk | ||
Cargo.lock | ||
tags |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
dist: trusty | ||
language: rust | ||
rust: | ||
- 1.28.0 | ||
script: ci/script.sh | ||
branches: | ||
only: | ||
- master |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
This project is dual-licensed under the Unlicense and MIT licenses. | ||
|
||
You may use this code under the terms of either license. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
[package] | ||
name = "winapi-util" | ||
version = "0.1.0" #:version | ||
authors = ["Andrew Gallant <[email protected]>"] | ||
description = "A dumping ground for high level safe wrappers over winapi." | ||
documentation = "https://docs.rs/winapi-util" | ||
homepage = "https://github.com/BurntSushi/winapi-util" | ||
repository = "https://github.com/BurntSushi/winapi-util" | ||
readme = "README.md" | ||
keywords = ["windows", "winapi", "util", "win"] | ||
license = "Unlicense/MIT" | ||
categories = ["os::windows-apis", "external-ffi-bindings"] | ||
|
||
[target.'cfg(windows)'.dependencies.winapi] | ||
version = "0.3" | ||
features = [ | ||
"std", | ||
"fileapi", | ||
"minwindef", | ||
"processenv", | ||
"winbase", | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
The MIT License (MIT) | ||
|
||
Copyright (c) 2017 Andrew Gallant | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in | ||
all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
THE SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
winapi-util | ||
=========== | ||
This crate provides a smattering of safe wrappers around various parts of the | ||
[winapi](https://crates.io/crates/winapi) crate. | ||
|
||
[](https://travis-ci.org/BurntSushi/winapi-util) | ||
[](https://ci.appveyor.com/project/BurntSushi/winapi-util) | ||
[](https://crates.io/crates/winapi-util) | ||
|
||
Dual-licensed under MIT or the [UNLICENSE](http://unlicense.org). | ||
|
||
|
||
### Documentation | ||
|
||
https://docs.rs/winapi-util | ||
|
||
|
||
### Usage | ||
|
||
Add this to your `Cargo.toml`: | ||
|
||
```toml | ||
[dependencies] | ||
winapi-util = "0.1" | ||
``` | ||
|
||
and this to your crate root: | ||
|
||
```rust | ||
extern crate winapi_util; | ||
``` | ||
|
||
|
||
### Notes | ||
|
||
This crate was born out of frustration with having to write lots of little | ||
ffi utility bindings in a variety of crates in order to get Windows support. | ||
Eventually, I started needing to copy & paste a lot of those utility routines. | ||
Since they are utility routines, they often don't make sense to expose directly | ||
in the crate in which they are defined. Instead of continuing this process, | ||
I decide to make a crate instead. | ||
|
||
Normally, I'm not a huge fan of "utility" crates like this that don't have a | ||
well defined scope, but this is primarily a practical endeavor to make it | ||
easier to isolate Windows specific ffi code. | ||
|
||
While I don't have a long term vision for this crate, I will welcome additional | ||
PRs that add more high level routines/types on an as-needed basis. | ||
|
||
**WARNING:** I am not a Windows developer, so extra review to make sure I've | ||
got things right is most appreciated. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
This is free and unencumbered software released into the public domain. | ||
|
||
Anyone is free to copy, modify, publish, use, compile, sell, or | ||
distribute this software, either in source code form or as a compiled | ||
binary, for any purpose, commercial or non-commercial, and by any | ||
means. | ||
|
||
In jurisdictions that recognize copyright laws, the author or authors | ||
of this software dedicate any and all copyright interest in the | ||
software to the public domain. We make this dedication for the benefit | ||
of the public at large and to the detriment of our heirs and | ||
successors. We intend this dedication to be an overt act of | ||
relinquishment in perpetuity of all present and future rights to this | ||
software under copyright law. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. | ||
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR | ||
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, | ||
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | ||
OTHER DEALINGS IN THE SOFTWARE. | ||
|
||
For more information, please refer to <http://unlicense.org/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
environment: | ||
matrix: | ||
- TARGET: x86_64-pc-windows-gnu | ||
BITS: 64 | ||
MSYS2: 1 | ||
- TARGET: x86_64-pc-windows-msvc | ||
BITS: 64 | ||
- TARGET: i686-pc-windows-gnu | ||
BITS: 32 | ||
MSYS2: 1 | ||
- TARGET: i686-pc-windows-msvc | ||
BITS: 32 | ||
install: | ||
- curl -sSf -o rustup-init.exe https://win.rustup.rs/ | ||
- rustup-init.exe -y --default-host %TARGET% | ||
- set PATH=%PATH%;C:\Users\appveyor\.cargo\bin | ||
- if defined MSYS2 set PATH=C:\msys64\mingw%BITS%\bin;%PATH% | ||
- rustc -V | ||
- cargo -V | ||
build: false | ||
test_script: | ||
- cargo build --verbose --all | ||
- cargo test --verbose --all | ||
branches: | ||
only: | ||
- master |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/sh | ||
|
||
set -ex | ||
|
||
cargo build --verbose --all | ||
cargo doc --verbose --all | ||
cargo test --verbose --all |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
/*! | ||
TODO. | ||
Note that this crate is completely empty on non-Windows platforms. | ||
*/ | ||
|
||
#[cfg(windows)] | ||
extern crate winapi; | ||
|
||
#[cfg(windows)] | ||
pub use win::*; | ||
|
||
#[cfg(windows)] | ||
mod win; |
Empty file.