Tls support

This commit is contained in:
bjorn3 2019-10-27 16:55:35 +01:00
parent 0e0afb4f1f
commit c8de552c01
13 changed files with 270 additions and 207 deletions

317
Cargo.lock generated
View File

@ -4,448 +4,437 @@
name = "ar"
version = "0.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "450575f58f7bee32816abbff470cbc47797397c2a81e0eaced4b98436daf52e1"
[[package]]
name = "autocfg"
version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f8aac770f1885fd7e387acedd76065302551364496e46b3dd00860b2f8359b9d"
[[package]]
name = "bitflags"
version = "1.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693"
[[package]]
name = "byteorder"
version = "1.3.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "08c48aae112d48ed9f069b33538ea9e3e90aa263cfa3d1c24309612b1f7472de"
[[package]]
name = "cc"
version = "1.0.50"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "95e28fa049fda1c330bcf9d723be7663a899c4679724b34c81e9f5a326aab8cd"
[[package]]
name = "cfg-if"
version = "0.1.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822"
[[package]]
name = "cranelift-bforest"
version = "0.58.0"
source = "git+https://github.com/bytecodealliance/cranelift/#5ad55057f18652ad0a4f270cd9b2876eb051c7d0"
version = "0.59.0"
source = "git+https://github.com/bytecodealliance/cranelift/#1d144eeacffb1997cc567b7d518f195932ee3d92"
dependencies = [
"cranelift-entity 0.58.0 (git+https://github.com/bytecodealliance/cranelift/)",
"cranelift-entity",
]
[[package]]
name = "cranelift-codegen"
version = "0.58.0"
source = "git+https://github.com/bytecodealliance/cranelift/#5ad55057f18652ad0a4f270cd9b2876eb051c7d0"
version = "0.59.0"
source = "git+https://github.com/bytecodealliance/cranelift/#1d144eeacffb1997cc567b7d518f195932ee3d92"
dependencies = [
"byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
"cranelift-bforest 0.58.0 (git+https://github.com/bytecodealliance/cranelift/)",
"cranelift-codegen-meta 0.58.0 (git+https://github.com/bytecodealliance/cranelift/)",
"cranelift-codegen-shared 0.58.0 (git+https://github.com/bytecodealliance/cranelift/)",
"cranelift-entity 0.58.0 (git+https://github.com/bytecodealliance/cranelift/)",
"gimli 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
"smallvec 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"target-lexicon 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)",
"thiserror 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)",
"byteorder",
"cranelift-bforest",
"cranelift-codegen-meta",
"cranelift-codegen-shared",
"cranelift-entity",
"gimli",
"log",
"smallvec",
"target-lexicon",
"thiserror",
]
[[package]]
name = "cranelift-codegen-meta"
version = "0.58.0"
source = "git+https://github.com/bytecodealliance/cranelift/#5ad55057f18652ad0a4f270cd9b2876eb051c7d0"
version = "0.59.0"
source = "git+https://github.com/bytecodealliance/cranelift/#1d144eeacffb1997cc567b7d518f195932ee3d92"
dependencies = [
"cranelift-codegen-shared 0.58.0 (git+https://github.com/bytecodealliance/cranelift/)",
"cranelift-entity 0.58.0 (git+https://github.com/bytecodealliance/cranelift/)",
"cranelift-codegen-shared",
"cranelift-entity",
]
[[package]]
name = "cranelift-codegen-shared"
version = "0.58.0"
source = "git+https://github.com/bytecodealliance/cranelift/#5ad55057f18652ad0a4f270cd9b2876eb051c7d0"
version = "0.59.0"
source = "git+https://github.com/bytecodealliance/cranelift/#1d144eeacffb1997cc567b7d518f195932ee3d92"
[[package]]
name = "cranelift-entity"
version = "0.58.0"
source = "git+https://github.com/bytecodealliance/cranelift/#5ad55057f18652ad0a4f270cd9b2876eb051c7d0"
version = "0.59.0"
source = "git+https://github.com/bytecodealliance/cranelift/#1d144eeacffb1997cc567b7d518f195932ee3d92"
[[package]]
name = "cranelift-frontend"
version = "0.58.0"
source = "git+https://github.com/bytecodealliance/cranelift/#5ad55057f18652ad0a4f270cd9b2876eb051c7d0"
version = "0.59.0"
source = "git+https://github.com/bytecodealliance/cranelift/#1d144eeacffb1997cc567b7d518f195932ee3d92"
dependencies = [
"cranelift-codegen 0.58.0 (git+https://github.com/bytecodealliance/cranelift/)",
"log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
"smallvec 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"target-lexicon 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)",
"cranelift-codegen",
"log",
"smallvec",
"target-lexicon",
]
[[package]]
name = "cranelift-module"
version = "0.58.0"
source = "git+https://github.com/bytecodealliance/cranelift/#5ad55057f18652ad0a4f270cd9b2876eb051c7d0"
version = "0.59.0"
source = "git+https://github.com/bytecodealliance/cranelift/#1d144eeacffb1997cc567b7d518f195932ee3d92"
dependencies = [
"cranelift-codegen 0.58.0 (git+https://github.com/bytecodealliance/cranelift/)",
"cranelift-entity 0.58.0 (git+https://github.com/bytecodealliance/cranelift/)",
"log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
"thiserror 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)",
"cranelift-codegen",
"cranelift-entity",
"log",
"thiserror",
]
[[package]]
name = "cranelift-native"
version = "0.58.0"
source = "git+https://github.com/bytecodealliance/cranelift/#5ad55057f18652ad0a4f270cd9b2876eb051c7d0"
version = "0.59.0"
source = "git+https://github.com/bytecodealliance/cranelift/#1d144eeacffb1997cc567b7d518f195932ee3d92"
dependencies = [
"cranelift-codegen 0.58.0 (git+https://github.com/bytecodealliance/cranelift/)",
"raw-cpuid 7.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
"target-lexicon 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)",
"cranelift-codegen",
"raw-cpuid",
"target-lexicon",
]
[[package]]
name = "cranelift-object"
version = "0.58.0"
source = "git+https://github.com/bytecodealliance/cranelift/#5ad55057f18652ad0a4f270cd9b2876eb051c7d0"
version = "0.59.0"
source = "git+https://github.com/bytecodealliance/cranelift/#1d144eeacffb1997cc567b7d518f195932ee3d92"
dependencies = [
"cranelift-codegen 0.58.0 (git+https://github.com/bytecodealliance/cranelift/)",
"cranelift-module 0.58.0 (git+https://github.com/bytecodealliance/cranelift/)",
"object 0.17.0 (registry+https://github.com/rust-lang/crates.io-index)",
"target-lexicon 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)",
"cranelift-codegen",
"cranelift-module",
"goblin",
"object",
"target-lexicon",
]
[[package]]
name = "cranelift-simplejit"
version = "0.58.0"
source = "git+https://github.com/bytecodealliance/cranelift/#5ad55057f18652ad0a4f270cd9b2876eb051c7d0"
version = "0.59.0"
source = "git+https://github.com/bytecodealliance/cranelift/#1d144eeacffb1997cc567b7d518f195932ee3d92"
dependencies = [
"cranelift-codegen 0.58.0 (git+https://github.com/bytecodealliance/cranelift/)",
"cranelift-module 0.58.0 (git+https://github.com/bytecodealliance/cranelift/)",
"cranelift-native 0.58.0 (git+https://github.com/bytecodealliance/cranelift/)",
"errno 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)",
"region 2.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"target-lexicon 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)",
"winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
"cranelift-codegen",
"cranelift-module",
"cranelift-native",
"errno",
"libc",
"region",
"target-lexicon",
"winapi",
]
[[package]]
name = "crc32fast"
version = "1.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ba125de2af0df55319f41944744ad91c71113bf74a4646efff39afe1f6842db1"
dependencies = [
"cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
"cfg-if",
]
[[package]]
name = "errno"
version = "0.2.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c2a071601ed01b988f896ab14b95e67335d1eeb50190932a1320f7fe3cadc84e"
dependencies = [
"errno-dragonfly 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)",
"winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
"errno-dragonfly",
"libc",
"winapi",
]
[[package]]
name = "errno-dragonfly"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "14ca354e36190500e1e1fb267c647932382b54053c50b14970856c0b00a35067"
dependencies = [
"gcc 0.3.55 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)",
"gcc",
"libc",
]
[[package]]
name = "gcc"
version = "0.3.55"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8f5f3913fa0bfe7ee1fd8248b6b9f42a5af4b9d65ec2dd2c3c26132b950ecfc2"
[[package]]
name = "gimli"
version = "0.20.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "81dd6190aad0f05ddbbf3245c54ed14ca4aa6dd32f22312b70d8f168c3e3e633"
dependencies = [
"byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
"indexmap 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
"byteorder",
"indexmap",
]
[[package]]
name = "goblin"
version = "0.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3081214398d39e4bd7f2c1975f0488ed04614ffdd976c6fc7a0708278552c0da"
dependencies = [
"log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
"plain 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
"scroll 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)",
"log",
"plain",
"scroll",
]
[[package]]
name = "indexmap"
version = "1.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "076f042c5b7b98f31d205f1249267e12a6518c1481e9dae9764af19b707d2292"
dependencies = [
"autocfg 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"autocfg",
]
[[package]]
name = "libc"
version = "0.2.67"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "eb147597cdf94ed43ab7a9038716637d2d1bf2bc571da995d0028dec06bd3018"
[[package]]
name = "libloading"
version = "0.5.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f2b111a074963af1d37a139918ac6d49ad1d0d5e47f72fd55388619691a7d753"
dependencies = [
"cc 1.0.50 (registry+https://github.com/rust-lang/crates.io-index)",
"winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
"cc",
"winapi",
]
[[package]]
name = "log"
version = "0.4.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "14b6052be84e6b71ab17edffc2eeabf5c2c3ae1fdb464aae35ac50c67a44e1f7"
dependencies = [
"cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
"cfg-if",
]
[[package]]
name = "mach"
version = "0.2.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "86dd2487cdfea56def77b88438a2c915fb45113c5319bfe7e14306ca4cd0b0e1"
dependencies = [
"libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)",
"libc",
]
[[package]]
name = "object"
version = "0.17.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ea44a4fd660ab0f38434934ca0212e90fbeaaee54126ef20a3451c30c95bafae"
dependencies = [
"crc32fast 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"goblin 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
"indexmap 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
"scroll 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)",
"target-lexicon 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)",
"uuid 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)",
"crc32fast",
"goblin",
"indexmap",
"scroll",
"target-lexicon",
"uuid",
]
[[package]]
name = "plain"
version = "0.2.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b4596b6d070b27117e987119b4dac604f3c58cfb0b191112e24771b2faeac1a6"
[[package]]
name = "proc-macro2"
version = "1.0.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3acb317c6ff86a4e579dfa00fc5e6cca91ecbb4e7eb2df0468805b674eb88548"
dependencies = [
"unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"unicode-xid",
]
[[package]]
name = "quote"
version = "1.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "053a8c8bcc71fcce321828dc897a98ab9760bef03a4fc36693c231e5b3216cfe"
dependencies = [
"proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)",
"proc-macro2",
]
[[package]]
name = "raw-cpuid"
version = "7.0.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b4a349ca83373cfa5d6dbb66fd76e58b2cca08da71a5f6400de0a0a6a9bceeaf"
dependencies = [
"bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
"cc 1.0.50 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
"bitflags",
"cc",
"rustc_version",
]
[[package]]
name = "region"
version = "2.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "448e868c6e4cfddfa49b6a72c95906c04e8547465e9536575b95c70a4044f856"
dependencies = [
"bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)",
"mach 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
"winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
"bitflags",
"libc",
"mach",
"winapi",
]
[[package]]
name = "rustc_codegen_cranelift"
version = "0.1.0"
dependencies = [
"ar 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
"byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
"cranelift-codegen 0.58.0 (git+https://github.com/bytecodealliance/cranelift/)",
"cranelift-frontend 0.58.0 (git+https://github.com/bytecodealliance/cranelift/)",
"cranelift-module 0.58.0 (git+https://github.com/bytecodealliance/cranelift/)",
"cranelift-object 0.58.0 (git+https://github.com/bytecodealliance/cranelift/)",
"cranelift-simplejit 0.58.0 (git+https://github.com/bytecodealliance/cranelift/)",
"gimli 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)",
"indexmap 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
"libloading 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)",
"object 0.17.0 (registry+https://github.com/rust-lang/crates.io-index)",
"target-lexicon 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)",
"ar",
"byteorder",
"cranelift-codegen",
"cranelift-frontend",
"cranelift-module",
"cranelift-object",
"cranelift-simplejit",
"gimli",
"indexmap",
"libloading",
"object",
"target-lexicon",
]
[[package]]
name = "rustc_version"
version = "0.2.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a"
dependencies = [
"semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
"semver",
]
[[package]]
name = "scroll"
version = "0.10.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "abb2332cb595d33f7edd5700f4cbf94892e680c7f0ae56adab58a35190b66cb1"
dependencies = [
"scroll_derive 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)",
"scroll_derive",
]
[[package]]
name = "scroll_derive"
version = "0.10.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f8584eea9b9ff42825b46faf46a8c24d2cff13ec152fa2a50df788b87c07ee28"
dependencies = [
"proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)",
"quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
"syn 1.0.15 (registry+https://github.com/rust-lang/crates.io-index)",
"proc-macro2",
"quote",
"syn",
]
[[package]]
name = "semver"
version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403"
dependencies = [
"semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
"semver-parser",
]
[[package]]
name = "semver-parser"
version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3"
[[package]]
name = "smallvec"
version = "1.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5c2fb2ec9bcd216a5b0d0ccf31ab17b5ed1d627960edff65bbe95d3ce221cefc"
[[package]]
name = "syn"
version = "1.0.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7a0294dc449adc58bb6592fff1a23d3e5e6e235afc6a0ffca2657d19e7bbffe5"
dependencies = [
"proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)",
"quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
"unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"proc-macro2",
"quote",
"unicode-xid",
]
[[package]]
name = "target-lexicon"
version = "0.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ab0e7238dcc7b40a7be719a25365910f6807bd864f4cce6b2e6b873658e2b19d"
[[package]]
name = "thiserror"
version = "1.0.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ee14bf8e6767ab4c687c9e8bc003879e042a96fd67a3ba5934eadb6536bef4db"
dependencies = [
"thiserror-impl 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)",
"thiserror-impl",
]
[[package]]
name = "thiserror-impl"
version = "1.0.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a7b51e1fbc44b5a0840be594fbc0f960be09050f2617e61e6aa43bef97cd3ef4"
dependencies = [
"proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)",
"quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
"syn 1.0.15 (registry+https://github.com/rust-lang/crates.io-index)",
"proc-macro2",
"quote",
"syn",
]
[[package]]
name = "unicode-xid"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "826e7639553986605ec5979c7dd957c7895e93eabed50ab2ffa7f6128a75097c"
[[package]]
name = "uuid"
version = "0.8.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9fde2f6a4bea1d6e007c4ad38c6839fa71cbb63b6dbf5b595aa38dc9b1093c11"
[[package]]
name = "winapi"
version = "0.3.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8093091eeb260906a183e6ae1abdba2ef5ef2257a21801128899c3fc699229c6"
dependencies = [
"winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"winapi-i686-pc-windows-gnu",
"winapi-x86_64-pc-windows-gnu",
]
[[package]]
name = "winapi-i686-pc-windows-gnu"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
[[package]]
name = "winapi-x86_64-pc-windows-gnu"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
[metadata]
"checksum ar 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "450575f58f7bee32816abbff470cbc47797397c2a81e0eaced4b98436daf52e1"
"checksum autocfg 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f8aac770f1885fd7e387acedd76065302551364496e46b3dd00860b2f8359b9d"
"checksum bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693"
"checksum byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "08c48aae112d48ed9f069b33538ea9e3e90aa263cfa3d1c24309612b1f7472de"
"checksum cc 1.0.50 (registry+https://github.com/rust-lang/crates.io-index)" = "95e28fa049fda1c330bcf9d723be7663a899c4679724b34c81e9f5a326aab8cd"
"checksum cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822"
"checksum cranelift-bforest 0.58.0 (git+https://github.com/bytecodealliance/cranelift/)" = "<none>"
"checksum cranelift-codegen 0.58.0 (git+https://github.com/bytecodealliance/cranelift/)" = "<none>"
"checksum cranelift-codegen-meta 0.58.0 (git+https://github.com/bytecodealliance/cranelift/)" = "<none>"
"checksum cranelift-codegen-shared 0.58.0 (git+https://github.com/bytecodealliance/cranelift/)" = "<none>"
"checksum cranelift-entity 0.58.0 (git+https://github.com/bytecodealliance/cranelift/)" = "<none>"
"checksum cranelift-frontend 0.58.0 (git+https://github.com/bytecodealliance/cranelift/)" = "<none>"
"checksum cranelift-module 0.58.0 (git+https://github.com/bytecodealliance/cranelift/)" = "<none>"
"checksum cranelift-native 0.58.0 (git+https://github.com/bytecodealliance/cranelift/)" = "<none>"
"checksum cranelift-object 0.58.0 (git+https://github.com/bytecodealliance/cranelift/)" = "<none>"
"checksum cranelift-simplejit 0.58.0 (git+https://github.com/bytecodealliance/cranelift/)" = "<none>"
"checksum crc32fast 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ba125de2af0df55319f41944744ad91c71113bf74a4646efff39afe1f6842db1"
"checksum errno 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "c2a071601ed01b988f896ab14b95e67335d1eeb50190932a1320f7fe3cadc84e"
"checksum errno-dragonfly 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "14ca354e36190500e1e1fb267c647932382b54053c50b14970856c0b00a35067"
"checksum gcc 0.3.55 (registry+https://github.com/rust-lang/crates.io-index)" = "8f5f3913fa0bfe7ee1fd8248b6b9f42a5af4b9d65ec2dd2c3c26132b950ecfc2"
"checksum gimli 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)" = "81dd6190aad0f05ddbbf3245c54ed14ca4aa6dd32f22312b70d8f168c3e3e633"
"checksum goblin 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3081214398d39e4bd7f2c1975f0488ed04614ffdd976c6fc7a0708278552c0da"
"checksum indexmap 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "076f042c5b7b98f31d205f1249267e12a6518c1481e9dae9764af19b707d2292"
"checksum libc 0.2.67 (registry+https://github.com/rust-lang/crates.io-index)" = "eb147597cdf94ed43ab7a9038716637d2d1bf2bc571da995d0028dec06bd3018"
"checksum libloading 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f2b111a074963af1d37a139918ac6d49ad1d0d5e47f72fd55388619691a7d753"
"checksum log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)" = "14b6052be84e6b71ab17edffc2eeabf5c2c3ae1fdb464aae35ac50c67a44e1f7"
"checksum mach 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "86dd2487cdfea56def77b88438a2c915fb45113c5319bfe7e14306ca4cd0b0e1"
"checksum object 0.17.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ea44a4fd660ab0f38434934ca0212e90fbeaaee54126ef20a3451c30c95bafae"
"checksum plain 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "b4596b6d070b27117e987119b4dac604f3c58cfb0b191112e24771b2faeac1a6"
"checksum proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)" = "3acb317c6ff86a4e579dfa00fc5e6cca91ecbb4e7eb2df0468805b674eb88548"
"checksum quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "053a8c8bcc71fcce321828dc897a98ab9760bef03a4fc36693c231e5b3216cfe"
"checksum raw-cpuid 7.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "b4a349ca83373cfa5d6dbb66fd76e58b2cca08da71a5f6400de0a0a6a9bceeaf"
"checksum region 2.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "448e868c6e4cfddfa49b6a72c95906c04e8547465e9536575b95c70a4044f856"
"checksum rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a"
"checksum scroll 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "abb2332cb595d33f7edd5700f4cbf94892e680c7f0ae56adab58a35190b66cb1"
"checksum scroll_derive 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f8584eea9b9ff42825b46faf46a8c24d2cff13ec152fa2a50df788b87c07ee28"
"checksum semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403"
"checksum semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3"
"checksum smallvec 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5c2fb2ec9bcd216a5b0d0ccf31ab17b5ed1d627960edff65bbe95d3ce221cefc"
"checksum syn 1.0.15 (registry+https://github.com/rust-lang/crates.io-index)" = "7a0294dc449adc58bb6592fff1a23d3e5e6e235afc6a0ffca2657d19e7bbffe5"
"checksum target-lexicon 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ab0e7238dcc7b40a7be719a25365910f6807bd864f4cce6b2e6b873658e2b19d"
"checksum thiserror 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)" = "ee14bf8e6767ab4c687c9e8bc003879e042a96fd67a3ba5934eadb6536bef4db"
"checksum thiserror-impl 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)" = "a7b51e1fbc44b5a0840be594fbc0f960be09050f2617e61e6aa43bef97cd3ef4"
"checksum unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "826e7639553986605ec5979c7dd957c7895e93eabed50ab2ffa7f6128a75097c"
"checksum uuid 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "9fde2f6a4bea1d6e007c4ad38c6839fa71cbb63b6dbf5b595aa38dc9b1093c11"
"checksum winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "8093091eeb260906a183e6ae1abdba2ef5ef2257a21801128899c3fc699229c6"
"checksum winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
"checksum winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"

View File

@ -1,34 +0,0 @@
From febff2a8c639efb5de1e1b4758cdb473847d80ce Mon Sep 17 00:00:00 2001
From: bjorn3 <bjorn3@users.noreply.github.com>
Date: Tue, 30 Jul 2019 12:12:37 +0200
Subject: [PATCH] Disable threads in shootout-regex-dna example
---
examples/shootout-regex-dna.rs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/examples/shootout-regex-dna.rs b/examples/shootout-regex-dna.rs
index 2171bb3..37382f8 100644
--- a/examples/shootout-regex-dna.rs
+++ b/examples/shootout-regex-dna.rs
@@ -37,7 +37,7 @@ fn main() {
for variant in variants {
let seq = seq_arc.clone();
let restr = variant.to_string();
- let future = thread::spawn(move || variant.find_iter(&seq).count());
+ let future = variant.find_iter(&seq).count();
counts.push((restr, future));
}
@@ -60,7 +60,7 @@ fn main() {
}
for (variant, count) in counts {
- println!("{} {}", variant, count.join().unwrap());
+ println!("{} {}", variant, count);
}
println!("\n{}\n{}\n{}", ilen, clen, seq.len());
}
--
2.11.0

View File

@ -1,6 +1,7 @@
#![feature(
no_core, lang_items, intrinsics, unboxed_closures, type_ascription, extern_types,
untagged_unions, decl_macro, rustc_attrs, transparent_unions, optin_builtin_traits
untagged_unions, decl_macro, rustc_attrs, transparent_unions, optin_builtin_traits,
thread_local,
)]
#![no_core]
#![allow(dead_code)]
@ -551,3 +552,11 @@ struct PanicLocation {
line: u32,
column: u32,
}
#[no_mangle]
pub fn get_tls() -> u8 {
#[thread_local]
static A: u8 = 42;
A
}

View File

@ -1,8 +1,11 @@
// Adapted from https://github.com/sunfishcode/mir2cranelift/blob/master/rust-examples/nocore-hello-world.rs
#![feature(no_core, unboxed_closures, start, lang_items, box_syntax, slice_patterns, never_type, linkage, extern_types)]
#![feature(
no_core, unboxed_closures, start, lang_items, box_syntax, slice_patterns, never_type, linkage,
extern_types, thread_local
)]
#![no_core]
#![allow(dead_code)]
#![allow(dead_code, non_camel_case_types)]
extern crate mini_core;
@ -276,6 +279,78 @@ fn main() {
extern_nullptr as *const ();
let slice_ptr = &[] as *const [u8];
slice_ptr as *const u8;
#[cfg(not(jit))]
test_tls();
}
#[repr(C)]
enum c_void {
_1,
_2,
}
type c_int = i32;
type c_ulong = u64;
type pthread_t = c_ulong;
#[repr(C)]
struct pthread_attr_t {
__size: [u64; 7],
}
#[link(name = "pthread")]
extern "C" {
fn pthread_attr_init(attr: *mut pthread_attr_t) -> c_int;
fn pthread_create(
native: *mut pthread_t,
attr: *const pthread_attr_t,
f: extern "C" fn(_: *mut c_void) -> *mut c_void,
value: *mut c_void
) -> c_int;
fn pthread_join(
native: pthread_t,
value: *mut *mut c_void
) -> c_int;
}
#[thread_local]
#[cfg(not(jit))]
static mut TLS: u8 = 42;
#[cfg(not(jit))]
extern "C" fn mutate_tls(_: *mut c_void) -> *mut c_void {
unsafe { TLS = 0; }
0 as *mut c_void
}
#[cfg(not(jit))]
fn test_tls() {
unsafe {
let mut attr: pthread_attr_t = intrinsics::init();
let mut thread: pthread_t = 0;
assert_eq!(TLS, 42);
if pthread_attr_init(&mut attr) != 0 {
assert!(false);
}
if pthread_create(&mut thread, &attr, mutate_tls, 0 as *mut c_void) != 0 {
assert!(false);
}
let mut res = 0 as *mut c_void;
pthread_join(thread, &mut res);
// TLS of main thread must not have been changed by the other thread.
assert_eq!(TLS, 42);
puts("TLS works!\n\0" as *const str as *const u8);
}
}
// Copied ui/issues/issue-61696.rs

View File

@ -12,6 +12,10 @@ fn main() {
let stderr = ::std::io::stderr();
let mut stderr = stderr.lock();
std::thread::spawn(move || {
println!("Hello from another thread!");
});
writeln!(stderr, "some {} text", "<unknown>").unwrap();
let _ = std::process::Command::new("true").env("c", "d").spawn();

View File

@ -95,8 +95,9 @@ index 143cf2f..a6e8faf 100644
// unsafe: see thread::Builder::spawn_unchecked for safety requirements
- pub unsafe fn new(stack: usize, p: Box<dyn FnOnce()>) -> io::Result<Thread> {
+ pub unsafe fn new(stack: usize, p: Box<dyn FnBox()>) -> io::Result<Thread> {
panic!("Warning: Threads are not yet fully supported, because cranelift doesn't support atomics.");
- panic!("Warning: Threads are not yet fully supported, because cranelift doesn't support atomics.");
+ println!("Spawned thread");
let p = box p;
let mut native: libc::pthread_t = mem::zeroed();
diff --git a/src/libstd/sys_common/at_exit_imp.rs b/src/libstd/sys_common/at_exit_imp.rs

View File

@ -9,7 +9,6 @@ git clone https://github.com/rust-lang/regex.git || echo "rust-lang/regex has al
pushd regex
git checkout -- .
git checkout 341f207c1071f7290e3f228c710817c280c8dca1
git apply ../crate_patches/regex.patch
popd
git clone https://github.com/ebobby/simple-raytracer || echo "ebobby/simple-raytracer has already been cloned"

View File

@ -22,6 +22,7 @@ pub fn init_global_lock(module: &mut Module<impl Backend>, bcx: &mut FunctionBui
"__cg_clif_global_atomic_mutex",
Linkage::Export,
true,
false,
Some(16),
).unwrap();
module.define_data(atomic_mutex, &data_ctx).unwrap();
@ -50,6 +51,7 @@ pub fn lock_global_lock(fx: &mut FunctionCx<'_, '_, impl Backend>) {
"__cg_clif_global_atomic_mutex",
Linkage::Import,
true,
false,
None,
).unwrap();
@ -74,6 +76,7 @@ pub fn unlock_global_lock(fx: &mut FunctionCx<'_, '_, impl Backend>) {
"__cg_clif_global_atomic_mutex",
Linkage::Import,
true,
false,
None,
).unwrap();

View File

@ -212,6 +212,7 @@ fn data_id_for_alloc_id<B: Backend>(
&format!("__alloc_{}", alloc_id.0),
Linkage::Local,
false,
false,
Some(align.bytes() as u8),
)
.unwrap()
@ -238,11 +239,14 @@ fn data_id_for_static(
.pref
.bytes();
let attrs = tcx.codegen_fn_attrs(def_id);
let data_id = module
.declare_data(
&*symbol_name,
linkage,
is_mutable,
attrs.flags.contains(rustc::middle::codegen_fn_attrs::CodegenFnAttrFlags::THREAD_LOCAL),
Some(align.try_into().unwrap()),
)
.unwrap();

View File

@ -256,6 +256,10 @@ fn target_triple(sess: &Session) -> target_lexicon::Triple {
}
fn build_isa(sess: &Session, enable_pic: bool) -> Box<dyn isa::TargetIsa + 'static> {
use target_lexicon::BinaryFormat;
let target_triple = crate::target_triple(sess);
let mut flags_builder = settings::builder();
if enable_pic {
flags_builder.enable("is_pic").unwrap();
@ -274,6 +278,14 @@ fn build_isa(sess: &Session, enable_pic: bool) -> Box<dyn isa::TargetIsa + 'stat
)
.unwrap();
let tls_model = match target_triple.binary_format {
BinaryFormat::Elf => "elf_gd",
BinaryFormat::Macho => "macho",
BinaryFormat::Coff => "coff",
_ => "none",
};
flags_builder.set("tls_model", tls_model).unwrap();
// FIXME(CraneStation/cranelift#732) fix LICM in presence of jump tables
/*
use rustc::session::config::OptLevel;
@ -290,7 +302,6 @@ fn build_isa(sess: &Session, enable_pic: bool) -> Box<dyn isa::TargetIsa + 'stat
}
}*/
let target_triple = crate::target_triple(sess);
let flags = settings::Flags::new(flags_builder);
cranelift_codegen::isa::lookup(target_triple)
.unwrap()

View File

@ -29,6 +29,7 @@ fn codegen_print(fx: &mut FunctionCx<'_, '_, impl cranelift_module::Backend>, ms
&(symbol_name.name.as_str().to_string() + msg),
Linkage::Local,
false,
false,
None,
)
.unwrap();

View File

@ -129,6 +129,7 @@ fn build_vtable<'tcx>(
&format!("vtable.{:?}.for.{:?}", trait_ref, layout.ty),
Linkage::Local,
false,
false,
Some(
fx.tcx
.data_layout

View File

@ -22,7 +22,7 @@ echo "[BUILD] example"
$RUSTC example/example.rs --crate-type lib
echo "[JIT] mini_core_hello_world"
JIT_ARGS="abc bcd" SHOULD_RUN=1 $RUSTC --crate-type bin -Cprefer-dynamic example/mini_core_hello_world.rs
JIT_ARGS="abc bcd" SHOULD_RUN=1 $RUSTC --crate-type bin -Cprefer-dynamic example/mini_core_hello_world.rs --cfg jit
echo "[AOT] mini_core_hello_world"
$RUSTC example/mini_core_hello_world.rs --crate-name mini_core_hello_world --crate-type bin -g
@ -88,7 +88,7 @@ echo "[TEST] rust-lang/regex example shootout-regex-dna"
../cargo.sh clean
# Make sure `[codegen mono items] start` doesn't poison the diff
../cargo.sh build --example shootout-regex-dna
cat examples/regexdna-input.txt | ../cargo.sh run --example shootout-regex-dna > res.txt
cat examples/regexdna-input.txt | ../cargo.sh run --example shootout-regex-dna | grep -v "Spawned thread" > res.txt
diff -u res.txt examples/regexdna-output.txt
echo "[TEST] rust-lang/regex tests"