Update to Edition 2021 and fix docker build

This commit is contained in:
Aram 🍐 2022-06-25 11:12:23 -04:00
parent 75bad318f4
commit 00b45f8cb4
4 changed files with 7 additions and 6 deletions

View file

@ -10,7 +10,7 @@ jobs:
matrix:
rust:
- stable
- 1.55.0
- 1.56.0
steps:
- name: Checkout sources
uses: actions/checkout@v2
@ -39,7 +39,7 @@ jobs:
matrix:
rust:
- stable
- 1.55.0
- 1.56.0
steps:
- name: Checkout sources
uses: actions/checkout@v2

View file

@ -1,7 +1,7 @@
[package]
name = "onetun"
version = "0.3.1"
edition = "2018"
edition = "2021"
license = "MIT"
description = "A cross-platform, user-space WireGuard port-forwarder that requires no system network configurations."
authors = ["Aram Peres <aram.peres@gmail.com>"]

View file

@ -1,10 +1,11 @@
FROM rust:1.55 as cargo-build
FROM rust:1.56 as cargo-build
WORKDIR /usr/src/onetun
COPY Cargo.toml Cargo.toml
# Placeholder to download dependencies and cache them using layering
RUN mkdir src/
RUN touch src/lib.rs
RUN echo "fn main() {println!(\"if you see this, the build broke\")}" > src/main.rs
RUN cargo build --release
RUN rm -f target/x86_64-unknown-linux-musl/release/deps/myapp*

View file

@ -21,7 +21,7 @@ For example,
## Download
onetun is available to install from [crates.io](https://crates.io/crates/onetun) with Rust ≥1.55:
onetun is available to install from [crates.io](https://crates.io/crates/onetun) with Rust ≥1.56:
```shell
$ cargo install onetun
@ -37,7 +37,7 @@ $ docker run --rm --name onetun --user 1000 -p 8080:8080 aramperes/onetun \
0.0.0.0:8080:192.168.4.2:8080 [...options...]
```
You can also build onetun locally, using Rust ≥1.55:
You can also build onetun locally, using Rust ≥1.56:
```shell
$ git clone https://github.com/aramperes/onetun && cd onetun