Skip to content
Permalink
Browse files

128 bit numbers (#88)

* Add failing tests for int parsing
* Fix parsing i64_min
* Implement 128 bit numbers
* Add tests for indexing
* Add tests fort deserialize
* Add devcontainer for OS indipendant builds
* Test coverage improvement
* Add from for Static Value and add tests
* Update lib.rs docs with features
* 128 bit sede tests
  • Loading branch information
Licenser committed Jan 26, 2020
1 parent 1bf1abf commit ad0c9590fa703409715211b55dbb4f0277e82d1a
@@ -0,0 +1,50 @@
#-------------------------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See https://go.microsoft.com/fwlink/?linkid=2090316 for license information.
#-------------------------------------------------------------------------------------------------------------

FROM rust:1

# This Dockerfile adds a non-root user with sudo access. Use the "remoteUser"
# property in devcontainer.json to use it. On Linux, the container user's GID/UIDs
# will be updated to match your local UID/GID (when using the dockerFile property).
# See https://aka.ms/vscode-remote/containers/non-root-user for details.
ARG USERNAME=vscode
ARG USER_UID=1000
ARG USER_GID=$USER_UID

# Avoid warnings by switching to noninteractive
ENV DEBIAN_FRONTEND=noninteractive

# Configure apt and install packages
RUN apt-get update \
&& apt-get -y install --no-install-recommends apt-utils dialog 2>&1 \
#
# Verify git, needed tools installed
&& apt-get -y install git iproute2 procps lsb-release \
#
# Install lldb, vadimcn.vscode-lldb VSCode extension dependencies
&& apt-get install -y lldb python3-minimal libpython3.7 \
#
# Install Rust components
&& rustup update \
&& rustup component add rls rust-analysis rust-src rustfmt clippy \
#
# Create a non-root user to use if preferred - see https://aka.ms/vscode-remote/containers/non-root-user.
&& groupadd --gid $USER_GID $USERNAME \
&& useradd -s /bin/bash --uid $USER_UID --gid $USER_GID -m $USERNAME \
# [Optional] Add sudo support for the non-root user
&& apt-get install -y sudo \
&& echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME\
&& chmod 0440 /etc/sudoers.d/$USERNAME \
#
# Tarpaulin
&& cargo install cargo-tarpaulin \
#
# Clean up
&& apt-get autoremove -y \
&& apt-get clean -y \
&& rm -rf /var/lib/apt/lists/*

# Switch back to dialog for any ad-hoc use of apt-get
ENV DEBIAN_FRONTEND=dialog
@@ -0,0 +1,31 @@
// For format details, see https://aka.ms/vscode-remote/devcontainer.json or the definition README at
// https://github.com/microsoft/vscode-dev-containers/tree/master/containers/ubuntu-18.04-git
{
"name": "Ubuntu 18.04 & Git",
"dockerFile": "Dockerfile",
// The optional 'runArgs' property can be used to specify additional runtime arguments.
"runArgs": [
// Uncomment the line if you will use a ptrace-based debugger like C++, Go, and Rust.
"--cap-add=SYS_PTRACE", "--security-opt", "seccomp=unconfined"

// Uncomment the next line to use a non-root user. On Linux, this will prevent
// new files getting created as root, but you may need to update the USER_UID
// and USER_GID in .devcontainer/Dockerfile to match your user if not 1000.
// "-u", "vscode"
],

// Use 'settings' to set *default* container specific settings.json values on container create.
// You can edit these settings after create using File > Preferences > Settings > Remote.
"settings": {
"terminal.integrated.shell.linux": "/bin/bash"
},

// Uncomment the next line if you want to publish any ports.
// "appPort": [],

// Uncomment the next line to run commands after the container is created.
// "postCreateCommand": "uname -a",

// Add the IDs of extensions you want installed when the container is created in the array below.
"extensions": []
}
@@ -47,7 +47,7 @@ jobs:
with:
token: ${{secrets.CODECOV_TOKEN}} #required
file: ./sse.xml
flags: e
flags: sse
tarpaulin-avx2:
runs-on: ubuntu-latest
steps:
@@ -86,7 +86,7 @@ jobs:
env:
RUSTFLAGS: "-C target-cpu=native -C target-feature=-avx2"
PROPTEST_CASES: 512
run: cargo tarpaulin -v --features no-inline known-key --out Xml && cp cobertura.xml sse-known-key.xml
run: cargo tarpaulin -v --features no-inline,known-key,128bit --out Xml && cp cobertura.xml sse-known-key.xml
- uses: codecov/codecov-action@v1.0.2
with:
token: ${{secrets.CODECOV_TOKEN}} #required
@@ -108,7 +108,7 @@ jobs:
env:
RUSTFLAGS: "-C target-cpu=native"
PROPTEST_CASES: 512
run: cargo tarpaulin -v --features no-inline known-key --out Xml && cp cobertura.xml avx2-known-key.xml
run: cargo tarpaulin -v --features no-inline,known-key,128bit --out Xml && cp cobertura.xml avx2-known-key.xml
- uses: codecov/codecov-action@v1.0.2
with:
token: ${{secrets.CODECOV_TOKEN}} #required
@@ -19,6 +19,7 @@ jobs:
features:
- ''
- '--features known-key'
- '--features 128bit'
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v1
@@ -0,0 +1,10 @@
{
"cSpell.words": [
"deserializer",
"oneof",
"proptest",
"sjson",
"stry",
"swar"
]
}
@@ -52,6 +52,8 @@ harness = false

[features]
default = ["swar-number-parsing", "serde_impl"]
# Support for 128 bit integers
128bit = []
# used for enabeling known keys in favour of a slower
# hasher that is not protected against hash collision
# attacks

0 comments on commit ad0c959

Please sign in to comment.
You can’t perform that action at this time.