Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

128 bit numbers #88

Merged
merged 29 commits into from Jan 26, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
37c6cba
Add failing tests for int parsing
Licenser Dec 4, 2019
f623b42
Fix parsing i64_min
Licenser Dec 4, 2019
bf5774c
First intro of 128bit integers in non parsing code
Licenser Dec 4, 2019
78b1d1f
Implement 128 bit numbers
Licenser Dec 4, 2019
d130205
Update tests
Licenser Dec 4, 2019
ae28c61
Obey the clippy
Licenser Dec 4, 2019
06f5999
Fix warning
Licenser Dec 4, 2019
5838f19
Add first test
Licenser Dec 5, 2019
9fccab5
Obey the clippy
Licenser Dec 5, 2019
39ad20c
Add tests for indexing
Licenser Dec 5, 2019
fdfb9ba
Add missing file
Licenser Dec 5, 2019
3f7629f
Add tests fort deserialize
Licenser Dec 5, 2019
73eda2e
Add devcontainer for OS indipendant builds
Licenser Dec 18, 2019
51ed04f
Update dev container
Licenser Dec 18, 2019
6debfc9
Test coverage improvement
Licenser Dec 18, 2019
98e638b
More tests for serializers
Licenser Dec 18, 2019
3f278a3
Tests for objects
Licenser Dec 18, 2019
b92ab01
Add from for Static Value and add tests
Licenser Dec 18, 2019
c844be8
cargo fmt
Licenser Dec 18, 2019
24aaa81
Refactoring of tests
Licenser Dec 18, 2019
5f68a6f
fix bad upload
Licenser Dec 18, 2019
0601ea9
Add test for poistive 128bit numbers
Licenser Dec 18, 2019
d8406ed
Make tarpaulin happy
Licenser Dec 18, 2019
238bea0
Fix formating
Licenser Dec 18, 2019
1cfed88
Update lib.rs docs with features
Licenser Dec 18, 2019
a86ff16
fmt
Licenser Dec 18, 2019
04915bc
Objey clippy
Licenser Dec 18, 2019
476ed98
128 bit sede tests
Licenser Jan 14, 2020
51a2835
Fix clippy warnings
Licenser Jan 14, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
50 changes: 50 additions & 0 deletions .devcontainer/Dockerfile
@@ -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
31 changes: 31 additions & 0 deletions .devcontainer/devcontainer.json
@@ -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": []
}
6 changes: 3 additions & 3 deletions .github/workflows/quality.yaml
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/tests.yml
Expand Up @@ -19,6 +19,7 @@ jobs:
features:
- ''
- '--features known-key'
- '--features 128bit'
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v1
Expand Down
10 changes: 10 additions & 0 deletions .vscode/settings.json
@@ -0,0 +1,10 @@
{
"cSpell.words": [
"deserializer",
"oneof",
"proptest",
"sjson",
"stry",
"swar"
]
}
2 changes: 2 additions & 0 deletions Cargo.toml
Expand Up @@ -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
Expand Down