diff --git a/third_party/cfg-if/.travis.yml b/third_party/cfg-if/.travis.yml deleted file mode 100644 index 28ddf9b87..000000000 --- a/third_party/cfg-if/.travis.yml +++ /dev/null @@ -1,22 +0,0 @@ -language: rust -rust: - - stable - - beta - - nightly -sudo: false -before_script: - - pip install 'travis-cargo<0.2' --user && export PATH=$HOME/.local/bin:$PATH -script: - - cargo build --verbose - - cargo test --verbose - - cargo doc --no-deps -after_success: - - travis-cargo --only nightly doc-upload -env: - global: - secure: "TyMGH+sbPmKs9lKCziKShxWr3G6im0owEchVrbUChWnQIQv1WydXftFoEoUsVl6qZspjehWK1b1AsnIgCXK0HtEi4DnqLsxs0s36bOjfg5yHBT/pETTr6kcq7KAL4Be4GmI331k6gT1Oi0TPFp7Sg9xpiWsQqKIHA5Szk2wpFQ8=" - - -notifications: - email: - on_success: never diff --git a/third_party/cfg-if/Cargo.toml b/third_party/cfg-if/Cargo.toml index 6f477769a..66ce2238a 100644 --- a/third_party/cfg-if/Cargo.toml +++ b/third_party/cfg-if/Cargo.toml @@ -11,7 +11,4 @@ description = """ A macro to ergonomically define an item depending on a large number of #[cfg] parameters. Structured like an if-else chain, the first matching branch is the item that gets emitted. -""" - -[badges] -travis-ci = { repository = "alexcrichton/cfg-if" } +""" \ No newline at end of file diff --git a/third_party/cfg-if/README.md b/third_party/cfg-if/README.md index b84dfb946..e9859dadb 100644 --- a/third_party/cfg-if/README.md +++ b/third_party/cfg-if/README.md @@ -36,17 +36,9 @@ fn main() { # License -This project is licensed under either of +`cfg-if` is primarily distributed under the terms of both the MIT license and +the Apache License (Version 2.0), with portions covered by various BSD-like +licenses. - * Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or - http://www.apache.org/licenses/LICENSE-2.0) - * MIT license ([LICENSE-MIT](LICENSE-MIT) or - http://opensource.org/licenses/MIT) +See LICENSE-APACHE, and LICENSE-MIT for details. -at your option. - -### Contribution - -Unless you explicitly state otherwise, any contribution intentionally submitted -for inclusion in Serde by you, as defined in the Apache-2.0 license, shall be -dual licensed as above, without any additional terms or conditions. diff --git a/third_party/log/Cargo.toml b/third_party/log/Cargo.toml index 514e14653..10a261e36 100644 --- a/third_party/log/Cargo.toml +++ b/third_party/log/Cargo.toml @@ -47,7 +47,7 @@ appveyor = { repository = "alexcrichton/log" } sgx_tstd = { path = "../../sgx_tstd" } [dependencies] -cfg-if = { path = "../cfg-if" } +cfg-if = { version = "0.1.2", path = "../cfg-if" } serde = { version = "1.0", optional = true, default-features = false, path = "../serde-rs/serde/serde" } [dev-dependencies] diff --git a/third_party/matrixmultiply/Cargo.toml b/third_party/matrixmultiply/Cargo.toml index ea9141b52..152208d13 100644 --- a/third_party/matrixmultiply/Cargo.toml +++ b/third_party/matrixmultiply/Cargo.toml @@ -25,7 +25,7 @@ harness = false sgx_tstd = { path = "../../sgx_tstd" } [dependencies] -rawpointer = { path = "../rawpointer" } +rawpointer = { version = "0.1", path = "../rawpointer" } [dev-dependencies] bencher = "0.1.2" diff --git a/third_party/num/derive/x86_64-unknown-linux-sgx.json b/third_party/num/derive/x86_64-unknown-linux-sgx.json deleted file mode 100644 index 6cbb524f4..000000000 --- a/third_party/num/derive/x86_64-unknown-linux-sgx.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "arch": "x86_64", - "cpu": "x86-64", - "data-layout": "e-m:e-i64:64-f80:128-n8:16:32:64-S128", - "dynamic-linking": true, - "env": "sgx", - "exe-allocation-crate": "alloc_system", - "executables": true, - "has-elf-tls": true, - "has-rpath": true, - "linker-flavor": "gcc", - "linker-is-gnu": true, - "llvm-target": "x86_64-unknown-linux-gnu", - "max-atomic-width": 64, - "os": "linux", - "position-independent-executables": true, - "pre-link-args": { - "gcc": [ - "-Wl,--as-needed", - "-Wl,-z,noexecstack", - "-m64" - ] - }, - "relro-level": "full", - "stack-probes": true, - "target-c-int-width": "32", - "target-endian": "little", - "target-family": "unix", - "target-pointer-width": "64", - "vendor": "unknown" -} diff --git a/third_party/ring/Cargo.toml b/third_party/ring/Cargo.toml index e526f4452..9931bd927 100644 --- a/third_party/ring/Cargo.toml +++ b/third_party/ring/Cargo.toml @@ -281,7 +281,7 @@ sgx_tstd = { path = "../../sgx_tstd" } sgx_rand = { path = "../../sgx_rand" } [dependencies] -untrusted = { path = "../untrusted" } +untrusted = { version = "0.6", path = "../untrusted" } [target.'cfg(any(target_os = "redox", all(unix, not(any(target_os = "macos", target_os = "ios")))))'.dependencies] lazy_static = { path = "../lazy-static.rs" } diff --git a/third_party/rust-csv/ci/check-copy b/third_party/rust-csv/ci/check-copy old mode 100644 new mode 100755 diff --git a/third_party/rust-csv/csv-core/src/lib.rs b/third_party/rust-csv/csv-core/src/lib.rs index 4b1cee6c6..189bf6110 100644 --- a/third_party/rust-csv/csv-core/src/lib.rs +++ b/third_party/rust-csv/csv-core/src/lib.rs @@ -98,8 +98,8 @@ foo,\"bar,baz\" #![deny(missing_docs)] #![no_std] - #![cfg_attr(target_env = "sgx", feature(rustc_private))] + #[cfg(test)] extern crate arrayvec; extern crate sgx_trts; diff --git a/third_party/rust-csv/csv-index/src/lib.rs b/third_party/rust-csv/csv-index/src/lib.rs index 5c7140d37..955dc0761 100644 --- a/third_party/rust-csv/csv-index/src/lib.rs +++ b/third_party/rust-csv/csv-index/src/lib.rs @@ -80,6 +80,12 @@ amenable to serializing to disk.) */ #![deny(missing_docs)] +#![cfg_attr(not(target_env = "sgx"), no_std)] +#![cfg_attr(target_env = "sgx", feature(rustc_private))] + +#[cfg(not(target_env = "sgx"))] +#[macro_use(format)] +extern crate sgx_tstd as std; extern crate byteorder; extern crate csv; diff --git a/third_party/rust-csv/scripts/copy-examples b/third_party/rust-csv/scripts/copy-examples old mode 100644 new mode 100755 diff --git a/third_party/rustls/Cargo.toml b/third_party/rustls/Cargo.toml index 45ed0b608..4ff7e9c46 100644 --- a/third_party/rustls/Cargo.toml +++ b/third_party/rustls/Cargo.toml @@ -13,7 +13,7 @@ categories = ["network-programming", "cryptography"] sgx_tstd = { path = "../../sgx_tstd" } [dependencies] -untrusted = { path = "../untrusted" } +untrusted = { version = "0.6", path = "../untrusted" } base64 = { path = "../rust-base64" } log = { path = "../log" , optional = true } ring = { path = "../ring" , version="0.12.1", features = ["rsa_signing"] } diff --git a/third_party/sct/Cargo.toml b/third_party/sct/Cargo.toml index acf53ff54..959fe09b5 100644 --- a/third_party/sct/Cargo.toml +++ b/third_party/sct/Cargo.toml @@ -14,4 +14,4 @@ sgx_tstd = { path = "../../sgx_tstd" } [dependencies] ring = { version = "0.12", path = "../ring" } -untrusted = { path = "../untrusted" } +untrusted = { version = "0.6", path = "../untrusted" } \ No newline at end of file diff --git a/third_party/test_all.sh b/third_party/test_all.sh deleted file mode 100755 index 2e1ae65ca..000000000 --- a/third_party/test_all.sh +++ /dev/null @@ -1,40 +0,0 @@ -#!/bin/bash -x -# Copyright (C) 2017-2018 Baidu, Inc. All Rights Reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in -# the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Baidu, Inc., nor the names of its -# contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# - -test_cases=`ls` - -for i in ${test_cases[@]} -do - if [ "${i}" != 'serde-rs' ]; then - cd ${i} && xargo build --target x86_64-unknown-linux-sgx --release && git clean -fxd && cd .. - fi -done - -echo "Done!" diff --git a/third_party/untrusted/.gitattributes b/third_party/untrusted/.gitattributes deleted file mode 100644 index 35a6201ff..000000000 --- a/third_party/untrusted/.gitattributes +++ /dev/null @@ -1,8 +0,0 @@ -* text=auto !eol -*.sln eol=crlf -*.vcxproj eol=crlf -*.vcxproj.filters eol=crlf -*.props eol=crlf -*.bat eol=crlf -*.rc eol=crlf -*.pl linguist-language=Assembly diff --git a/third_party/untrusted/.travis.yml b/third_party/untrusted/.travis.yml deleted file mode 100644 index 9579d7476..000000000 --- a/third_party/untrusted/.travis.yml +++ /dev/null @@ -1,15 +0,0 @@ -language: rust -sudo: false -matrix: - allow_failures: - - rust: nightly - include: - - rust: stable - - - rust: beta - - - rust: nightly - -script: - - cargo test -vv --release - - cargo test -vv diff --git a/third_party/untrusted/Cargo.toml b/third_party/untrusted/Cargo.toml index 596353504..b2cf44d56 100644 --- a/third_party/untrusted/Cargo.toml +++ b/third_party/untrusted/Cargo.toml @@ -2,15 +2,14 @@ authors = ["Brian Smith "] description = "Safe, fast, zero-panic, zero-crashing, zero-allocation parsing of untrusted inputs in Rust." documentation = "https://briansmith.org/rustdoc/untrusted/" -license = "ISC" +license-file = "LICENSE.txt" name = "untrusted" readme = "README.md" repository = "https://github.com/briansmith/untrusted" -version = "0.6.1" +version = "0.6.0" [lib] name = "untrusted" -path = "src/untrusted.rs" [profile.bench] opt-level = 3 diff --git a/third_party/untrusted/src/untrusted.rs b/third_party/untrusted/src/untrusted.rs index 1dc213474..bb56e80d2 100644 --- a/third_party/untrusted/src/untrusted.rs +++ b/third_party/untrusted/src/untrusted.rs @@ -141,7 +141,7 @@ impl<'a> Input<'a> { /// Returns an iterator over the input. #[inline] pub fn iter(&self) -> <&[u8] as IntoIterator>::IntoIter { - self.value.iter() + self.value.into_iter() } /// Returns the length of the `Input`. @@ -207,11 +207,11 @@ impl <'a, 'b> PartialEq<&'b [u8]> for Input<'a> { /// Calls `read` with the given input as a `Reader`, ensuring that `read` /// consumed the entire input. When `input` is `None`, `read` will be /// called with `None`. -pub fn read_all_optional(input: Option, - incomplete_read: E, read: F) - -> Result - where F: FnOnce(Option<&mut Reader>) - -> Result { +pub fn read_all_optional<'a, F, R, E>(input: Option>, + incomplete_read: E, read: F) + -> Result + where F: FnOnce(Option<&mut Reader>) + -> Result { match input { Some(input) => { let mut input = Reader::new(input); @@ -283,7 +283,7 @@ impl<'a> Reader<'a> { /// byte is equal to `b`, and false otherwise. pub fn peek(&self, b: u8) -> bool { match self.input.get(self.i) { - Some(actual_b) => b == *actual_b, + Some(actual_b) => return b == *actual_b, None => false } } @@ -367,7 +367,7 @@ mod no_panic { } #[inline] - pub fn iter(&self) -> <&'a [u8] as IntoIterator>::IntoIter { + pub fn into_iter(&self) -> <&'a [u8] as IntoIterator>::IntoIter { self.bytes.into_iter() } @@ -436,15 +436,4 @@ mod tests { let input = Input::from(slice); assert_eq!(input.as_slice_less_safe(), slice); } - - #[test] - fn test_input_as_iterator() { - let slice = b"foo"; - let input = Input::from(slice); - let mut iter = input.iter(); - assert_eq!(Some(&b'f'), iter.next()); - assert_eq!(Some(&b'o'), iter.next()); - assert_eq!(Some(&b'o'), iter.next()); - assert_eq!(None, iter.next()); - } } diff --git a/third_party/webpki/Cargo.toml b/third_party/webpki/Cargo.toml index 63d656673..c1c1dc3b4 100644 --- a/third_party/webpki/Cargo.toml +++ b/third_party/webpki/Cargo.toml @@ -67,7 +67,7 @@ sgx_tstd = { path = "../../sgx_tstd" } [dependencies] ring = { path = "../ring" } -untrusted = { path = "../untrusted" } +untrusted = { version = "0.6", path = "../untrusted" } [dev-dependencies] base64 = { path = "../rust-base64" }