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

Feature/deserde #413

Merged
merged 81 commits into from
Oct 24, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
81 commits
Select commit Hold shift + click to select a range
b9e3a80
a fresh new start
ZoeyR Jun 19, 2021
22ed10b
reorganize de/enc modules
ZoeyR Jun 19, 2021
b1ebece
First version of the bincode serialization spec
VictorKoenders Sep 13, 2021
a68c95d
Added documentation on String/&str
VictorKoenders Sep 13, 2021
a899cb7
Fixed internal links in spec.md
VictorKoenders Sep 13, 2021
ee83f30
Started working on bincode_derive
VictorKoenders Sep 13, 2021
a6a52a8
Removed derive/Cargo.lock
VictorKoenders Sep 13, 2021
85693e0
Enable CI for the deserde branch
VictorKoenders Sep 13, 2021
5cdb578
Made the encoder respect intencoding, implemented FixintEncoding
VictorKoenders Sep 19, 2021
f61fdeb
Renamed blob to slice
VictorKoenders Sep 19, 2021
8dbf723
Moved Encoder to its own file
VictorKoenders Sep 19, 2021
23221ce
Turned Config::INT_ENCODING back into a const, made a ton of varint_e…
VictorKoenders Sep 19, 2021
3deff50
Disabled rust 1.41 CI check
VictorKoenders Sep 19, 2021
54580ee
Re-enabled tarpaulin
VictorKoenders Sep 19, 2021
719edd9
Split Error into EncodeError and DecodeError
VictorKoenders Sep 19, 2021
9519dd2
Added decode_unsigned
VictorKoenders Sep 19, 2021
ff80a8d
Added unit tests for decoding errors
VictorKoenders Sep 19, 2021
f45080b
Added unit tests for encode_signed
VictorKoenders Sep 19, 2021
4ca934a
Add generic bound support to derive
ZoeyR Sep 20, 2021
419e26f
Add derive for Decodeable
ZoeyR Sep 20, 2021
5aa3031
Add derive support for tuple structs
ZoeyR Sep 20, 2021
410abd8
Add enum encode/decode derive
ZoeyR Sep 20, 2021
b5e4b33
Exclude derive from coverage
ZoeyR Sep 20, 2021
588dfab
Made clippy also check _derive, fixed clippy warnings
VictorKoenders Sep 21, 2021
8c25ee6
Added decode_ fns
VictorKoenders Sep 22, 2021
caa95c5
Added config options for endian and int_encoding, added full coverage…
VictorKoenders Sep 22, 2021
620cf86
Added support for slices, str, fixed size arrays. Added lifetime to D…
VictorKoenders Sep 22, 2021
c6cb968
Enable non-slice readers
ZoeyR Sep 22, 2021
4782e48
Moved all feature flags to src/features, made the CI run tests on all…
VictorKoenders Sep 22, 2021
f631913
Clean up the borrow crimes
ZoeyR Sep 22, 2021
cb23078
Removed `allow` attributes, fixed some warnings
VictorKoenders Sep 25, 2021
484a9ce
Make bincode_derive 0 dependencies (#409)
VictorKoenders Oct 12, 2021
55fe28a
Added alloc and std tests
VictorKoenders Oct 12, 2021
1763642
Started working on documentation
VictorKoenders Oct 12, 2021
38c7d2d
Removed unneeded Config trait constraints
VictorKoenders Oct 12, 2021
c9ffe28
Added documentation for the src/de module
VictorKoenders Oct 14, 2021
5ae3117
Added documentation for the src/enc module
VictorKoenders Oct 14, 2021
62081c0
Added documentation for the src/featyres module
VictorKoenders Oct 14, 2021
b3cbd8c
Added documentation for the src/ module. Added warning for missing do…
VictorKoenders Oct 14, 2021
41da862
Added support for char encoding/decoding
VictorKoenders Oct 14, 2021
3425380
Added support for the bool type
VictorKoenders Oct 14, 2021
986f9dc
Added support for tuples with up to 8 values
VictorKoenders Oct 14, 2021
4792d15
Added an option to encode a fixed array length or to skip it
VictorKoenders Oct 14, 2021
94f67f5
Added support for Option<T> and Result<T, U>
VictorKoenders Oct 16, 2021
c827d58
Fixed newline issues in project
VictorKoenders Oct 16, 2021
549129a
Added support for Vec<T>, Box<T> and Box<[T]>
VictorKoenders Oct 16, 2021
30bd9e1
Added support for Cell and RefCell
VictorKoenders Oct 16, 2021
04ff6a6
Added support for Cow, Rc and Arc
VictorKoenders Oct 16, 2021
b383e0f
Added support for BinaryHeap, BTreeMap, BTreeSet and VecDeque
VictorKoenders Oct 16, 2021
66fa711
Added support for CStr and CString
VictorKoenders Oct 16, 2021
5f26eb0
Added support for String, Mutex<T> and RwLock<T>
VictorKoenders Oct 16, 2021
3d35f30
Added core::time::Duration and std::time::SystemTime
VictorKoenders Oct 16, 2021
fd203ab
Added support for Path and PathBuf
VictorKoenders Oct 16, 2021
70a8403
Added support for Range<T>, RangeInclusive<T> and Bound<T>
VictorKoenders Oct 16, 2021
10b2e31
Added support for NonZero* types
VictorKoenders Oct 16, 2021
40f90e9
Added support for IpAddr, Ipv4Addr, Ipv6Addr, SocketAddr, SocketAddrV…
VictorKoenders Oct 16, 2021
5e36fd9
Added support for atomic integers
VictorKoenders Oct 16, 2021
1c0d643
Added badges to the functions to indicate which features they require
VictorKoenders Oct 17, 2021
466bb3d
Refactor and rename encoders
ZoeyR Oct 17, 2021
4c9cbdf
Added warning on unused lifetimes, fixed warnings
VictorKoenders Oct 17, 2021
2e6474f
Made the test stage throw an error on warnings
VictorKoenders Oct 17, 2021
53f9d19
Made the varint decode_signed module report the correct errors
VictorKoenders Oct 17, 2021
4f01bd8
Config rewrite (#412)
ZoeyR Oct 17, 2021
1895a0b
Merge branch 'trunk' into feature/deserde
ZoeyR Oct 17, 2021
dfe8649
Processed some of the feedback
VictorKoenders Oct 18, 2021
34dd6cd
Added more documentation to derive/src/generate
VictorKoenders Oct 19, 2021
64d6447
Removed a panic in the derive/src/generate module, moved it to derive…
VictorKoenders Oct 19, 2021
8e10a07
Included spec.md into cargo's documentation, fixed the issues, change…
VictorKoenders Oct 19, 2021
103fe99
Made the Decode of [T; N] properly drop all instances of T when an er…
VictorKoenders Oct 19, 2021
50fb8d6
Replaced the decode implementation of [T; N] with the implementation …
VictorKoenders Oct 21, 2021
eb8625d
Added dedicated error for `std::path::Path` encoding. Fixed broken li…
VictorKoenders Oct 21, 2021
0ff5199
Fixed a copy-paste error where RwLock would report to be a Mutex if i…
VictorKoenders Oct 21, 2021
d769016
Changed bincode version to 2.0.0-alpha.0
VictorKoenders Oct 21, 2021
0eda6fc
Made all encode and decode functions always require a Config, removed…
VictorKoenders Oct 21, 2021
55eedc8
Joined the 2 Sealed traits into a single one
VictorKoenders Oct 21, 2021
f68ab2a
Updated documentation of Encode, added an example to lib.rs
VictorKoenders Oct 21, 2021
bdb8e89
Updated to edition 2021
VictorKoenders Oct 21, 2021
b4b3240
Optimize performance of slice writing
ZoeyR Oct 22, 2021
99806d3
Optimize performance of decoding u8 arrays
ZoeyR Oct 22, 2021
5f570c3
Reintroduce varint optimizations
ZoeyR Oct 24, 2021
157e60f
Fixed clippy lint, removed function that was only used in 1 place
VictorKoenders Oct 24, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
361 changes: 186 additions & 175 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
@@ -1,175 +1,186 @@
{
"name": "CI",
"on": {
"push": {
"branches": [
"trunk",
"v*.x"
]
},
"pull_request": {
"branches": [
"trunk",
"v*.x"
]
}
},
"jobs": {
"check": {
"name": "Check",
"runs-on": "ubuntu-latest",
"strategy": {
"fail-fast": false,
"matrix": {
"rust": [
"stable",
"beta",
"nightly",
# "1.55.0" TODO: Pick latest stable version when we release 2.0
]
}
},
"steps": [
{
"uses": "actions/checkout@v2",
"name": "Checkout"
},
{
"uses": "actions-rs/toolchain@v1",
"with": {
"profile": "minimal",
"toolchain": "${{ matrix.rust }}",
"override": true
},
"name": "Install Rust ${{ matrix.rust }}"
},
{
"uses": "actions-rs/cargo@v1",
"with": {
"command": "check"
},
"name": "Run `cargo check`"
},
{
"uses": "actions-rs/cargo@v1",
"with": {
"command": "check",
"args": "--examples"
},
"name": "Check examples",
"if": "matrix.rust != '1.41.0'"
}
]
},
"test": {
"name": "Test",
"runs-on": "ubuntu-latest",
"strategy": {
"matrix": {
"rust": [
"stable",
"beta",
"nightly"
]
}
},
"steps": [
{
"uses": "actions/checkout@v2",
"name": "Checkout"
},
{
"uses": "actions-rs/toolchain@v1",
"with": {
"profile": "minimal",
"toolchain": "${{ matrix.rust }}",
"override": true
},
"name": "Install Rust ${{ matrix.rust }}"
},
{
"uses": "actions-rs/cargo@v1",
"with": {
"command": "test"
},
"name": "Run `cargo test`"
}
]
},
"lints": {
"name": "Lints",
"runs-on": "ubuntu-latest",
"steps": [
{
"uses": "actions/checkout@v2",
"name": "Checkout"
},
{
"uses": "actions-rs/toolchain@v1",
"with": {
"profile": "minimal",
"toolchain": "stable",
"override": true,
"components": "rustfmt, clippy"
},
"name": "Install Rust stable"
},
{
"uses": "actions-rs/cargo@v1",
"with": {
"command": "fmt",
"args": "--all -- --check"
},
"name": "Run `cargo fmt`"
},
{
"uses": "actions-rs/cargo@v1",
"with": {
"command": "clippy",
"args": "-- -D warnings"
},
"name": "Run `cargo clippy`"
}
]
},
"coverage": {
"name": "Code Coverage",
"runs-on": "ubuntu-latest",
"steps": [
{
"uses": "actions/checkout@v2",
"name": "Checkout"
},
{
"uses": "actions-rs/toolchain@v1",
"with": {
"profile": "minimal",
"toolchain": "nightly",
"override": true
},
"name": "Install Rust nightly"
},
{
"name": "Run cargo-tarpaulin",
"uses": "actions-rs/[email protected]",
"with": {
"version": "0.12.3",
"args": "--ignore-tests -- --test-threads 1"
}
},
{
"name": "Upload to codecov.io",
"uses": "codecov/codecov-action@v1"
},
{
"name": "Archive code coverage results",
"uses": "actions/upload-artifact@v1",
"with": {
"name": "code-coverage-report",
"path": "cobertura.xml"
}
}
]
}
}
}
{
"name": "CI",
"on": {
"push": {
"branches": [
"trunk",
"feature/deserde*", # Temporary while we work on deserde
"v*.x"
]
},
"pull_request": {
"branches": [
"trunk",
"v*.x"
]
}
},
"jobs": {
"check": {
"name": "Check",
"runs-on": "ubuntu-latest",
"strategy": {
"fail-fast": false,
"matrix": {
"rust": [
"stable",
"beta",
"nightly"
# "1.55.0" TODO: Pick latest stable version when we release 2.0
]
}
},
"steps": [
{
"uses": "actions/checkout@v2",
"name": "Checkout"
},
{
"uses": "actions-rs/toolchain@v1",
"with": {
"profile": "minimal",
"toolchain": "${{ matrix.rust }}",
"override": true
},
"name": "Install Rust ${{ matrix.rust }}"
},
{
"uses": "actions-rs/cargo@v1",
"with": {
"command": "check"
},
"name": "Run `cargo check`"
}
# ,
# {
# "uses": "actions-rs/cargo@v1",
# "with": {
# "command": "check",
# "args": "--examples"
# },
# "name": "Check examples",
# "if": "matrix.rust != '1.41.0'"
# }
]
},
"test": {
"name": "Test",
"runs-on": "ubuntu-latest",
"strategy": {
"matrix": {
"rust": [
"stable",
"beta",
"nightly"
# "1.55.0" TODO: Pick latest stable version when we release 2.0
]
}
},
"steps": [
{
"uses": "actions/checkout@v2",
"name": "Checkout"
},
{
"uses": "actions-rs/toolchain@v1",
"with": {
"profile": "minimal",
"toolchain": "${{ matrix.rust }}",
"override": true
},
"name": "Install Rust ${{ matrix.rust }}"
},
{
"uses": "actions-rs/[email protected]",
"with": {
"crate": "cargo-all-features",
"version": "1.6.0"
},
"name": "Install cargo-all-features"
},
{
"run": "cargo test-all-features",
"name": "Run `cargo test` on all features",
"env": {
"RUSTFLAGS": "-D warnings"
}
}
]
},
"lints": {
"name": "Lints",
"runs-on": "ubuntu-latest",
"steps": [
{
"uses": "actions/checkout@v2",
"name": "Checkout"
},
{
"uses": "actions-rs/toolchain@v1",
"with": {
"profile": "minimal",
"toolchain": "stable",
"override": true,
"components": "rustfmt, clippy"
},
"name": "Install Rust stable"
},
{
"uses": "actions-rs/cargo@v1",
"with": {
"command": "fmt",
"args": "--all -- --check"
},
"name": "Run `cargo fmt`"
},
{
"uses": "actions-rs/cargo@v1",
"with": {
"command": "clippy",
"args": "--all-features -- -D warnings"
},
"name": "Run `cargo clippy`"
}
]
},
"coverage": {
"name": "Code Coverage",
"runs-on": "ubuntu-latest",
"steps": [
{
"uses": "actions/checkout@v2",
"name": "Checkout"
},
{
"uses": "actions-rs/toolchain@v1",
"with": {
"profile": "minimal",
"toolchain": "nightly",
"override": true
},
"name": "Install Rust nightly"
},
{
"name": "Run cargo-tarpaulin",
"uses": "actions-rs/[email protected]",
"with": {
"version": "0.18.2",
"args": "--all"
}
},
{
"name": "Upload to codecov.io",
"uses": "codecov/codecov-action@v1"
},
{
"name": "Archive code coverage results",
"uses": "actions/upload-artifact@v1",
"with": {
"name": "code-coverage-report",
"path": "cobertura.xml"
}
}
]
}
}
}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@
.cargo
.vscode
rls*.log
tarpaulin-report.html
1 change: 1 addition & 0 deletions .rustfmt.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
newline_style = "Unix"
Loading