diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 664a1829..a3271e84 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,7 +26,7 @@ jobs: minimum-version-check: strategy: matrix: - rust_toolchain: [1.57.0] + rust_toolchain: [1.60.0] os: [ubuntu-latest, macOS-latest, windows-latest] name: minimum version check using Rust ${{ matrix.rust_toolchain }} on ${{ matrix.os }} runs-on: ${{ matrix.os }} diff --git a/Cargo.toml b/Cargo.toml index 698cef2b..2aee7b20 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -19,7 +19,7 @@ base16 = { version = "0.2.1", default-features = false } # base64 = { version = "0.21.0", default-features = false } data-encoding = { version = "2.3.3", default-features = false } chrono = { version = "0.4.19", optional = true } -clap = { version = "3.1.6", optional = true, features = ["derive"] } +clap = { version = "4.0.8", optional = true, features = ["derive"] } codespan-reporting = "0.11.1" hexf-parse = "0.2.1" itertools = "0.10.1" diff --git a/Dockerfile b/Dockerfile index 5659b3a5..c8ec3ee3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,10 @@ -FROM ekidd/rust-musl-builder:1.57.0 AS builder +FROM rust:1.64.0-alpine AS builder +RUN apk update +RUN apk add --no-cache openssl-dev musl-dev +WORKDIR /usr/src/cddl COPY . ./ RUN cargo b --release --bin cddl -FROM scratch -COPY --from=builder /home/rust/src/target/x86_64-unknown-linux-musl/release/cddl /cddl -ENTRYPOINT [ "/cddl" ] \ No newline at end of file +FROM alpine:latest +COPY --from=builder /usr/src/cddl/target/release/cddl /usr/local/bin/cddl +ENTRYPOINT [ "/usr/local/bin/cddl" ] \ No newline at end of file diff --git a/README.md b/README.md index 1af1e1ee..adb94870 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ A Rust implementation of the Concise data definition language (CDDL). CDDL is an This crate includes a handwritten parser and lexer for CDDL, and its development has been heavily inspired by the techniques outlined in Thorsten Ball's book ["Writing An Interpretor In Go"](https://interpreterbook.com/). The AST has been built to closely match the rules defined by the ABNF grammar in [Appendix B.](https://tools.ietf.org/html/rfc8610#appendix-B) of the spec. All CDDL must use UTF-8 for its encoding per the spec. -This crate supports validation of both CBOR and JSON data structures. The minimum supported Rust version (MSRV) is 1.57.0. +This crate supports validation of both CBOR and JSON data structures. The minimum supported Rust version (MSRV) is 1.60.0. Also bundled into this repository is a basic language server implementation and extension for Visual Studio Code for editing CDDL. The implementation is backed by the compiled WebAssembly target included in this crate. diff --git a/src/bin/cli.rs b/src/bin/cli.rs index b9e21e12..17267650 100644 --- a/src/bin/cli.rs +++ b/src/bin/cli.rs @@ -63,15 +63,13 @@ struct Validate { short = 'j', long = "json", help = "JSON document(s) to validate", - use_value_delimiter = true, - multiple_values = true + use_value_delimiter = true )] json: Option>, #[clap( short = 'c', long = "cbor", help = "CBOR binary file(s) to validate", - multiple_values = true, use_value_delimiter = true )] cbor: Option>, diff --git a/src/lib.rs b/src/lib.rs index 940a718a..ff16522d 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -30,7 +30,7 @@ //! //! This crate supports validation of both CBOR and JSON data structures. An //! extremely basic REPL is included as well. This crate's minimum supported -//! Rust version (MSRV) is 1.57.0. +//! Rust version (MSRV) is 1.60.0. //! //! Also bundled into this repository is a basic language server implementation //! and extension for Visual Studio Code for editing CDDL. The implementation is