Skip to content

Commit

Permalink
Add winapi crate, make 'rand' and 'tempfile' work
Browse files Browse the repository at this point in the history
  • Loading branch information
piscisaureus authored and ry committed Jul 29, 2018
1 parent 37a4606 commit 604a8a6
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 1 deletion.
1 change: 1 addition & 0 deletions BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ main_extern = [
"$rust_build:rand",
"$rust_build:rand_core",
"$rust_build:remove_dir_all",
"$rust_build:winapi",
]

rust_executable("deno") {
Expand Down
44 changes: 44 additions & 0 deletions build_extra/rust/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ rust_component("tempfile") {
":libc",
":rand",
":remove_dir_all",
":winapi",
]
}

Expand All @@ -91,6 +92,9 @@ rust_component("rand") {
":libc",
":rand_core",
]
if (is_win) {
extern += [ ":winapi" ]
}
features = [
"std",
"alloc",
Expand All @@ -106,4 +110,44 @@ rust_component("rand_core") {

rust_component("remove_dir_all") {
source_root = "$crates/registry/src/github.com-1ecc6299db9ec823/remove_dir_all-0.5.1/src/lib.rs"
extern = []
if (is_win) {
extern += [ ":winapi" ]
}
}

rust_component("winapi") {
source_root =
"$crates/registry/src/github.com-1ecc6299db9ec823/winapi-0.3.5/src/lib.rs"
features = [
"basetsd",
"cfg",
"cfgmgr32",
"errhandlingapi",
"excpt",
"fileapi",
"guiddef",
"handleapi",
"ktmtypes",
"libloaderapi",
"lsalookup",
"minwinbase",
"minwindef",
"ntdef",
"ntsecapi",
"ntstatus",
"processthreadsapi",
"profileapi",
"sspi",
"std",
"subauth",
"vadefs",
"vcruntime",
"winbase",
"wincred",
"windef",
"winerror",
"winnt",
"winreg",
]
}
2 changes: 1 addition & 1 deletion third_party

0 comments on commit 604a8a6

Please sign in to comment.