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

WIP v0.5.0-rc.2 #3

Open
wants to merge 109 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
109 commits
Select commit Hold shift + click to select a range
03b09bd
msgpack Responder create named representations
Sep 2, 2021
0e36903
Changed logging level of launch messages to info.
davidv1992 Sep 21, 2021
d3bc005
Fix Path traversal attack link
xypnox Sep 26, 2021
5d93ec7
Fix some typos in cookie docs
w3irdrobot Oct 11, 2021
40ebe5b
Fix typo in template engines documentation
jurf Nov 30, 2021
e31daa5
Add blocking_worker config value
the10thWiz Jan 12, 2022
472a183
fix(log): implement print macros without panic
kolbma Jan 17, 2022
f37288d
build: crate cookie 0.16.0 released
kolbma Jan 17, 2022
b085928
build: order cookie features alphabetically
kolbma Jan 17, 2022
a31d29b
fix: CookieJar::get_private_pending()
kolbma Jan 17, 2022
3ab73d7
build!: update MSRV 1.51.0
kolbma Jan 17, 2022
2da8c53
build: Cargo.toml package.metatdata.msrv = 1.51.0
kolbma Jan 17, 2022
664773d
build: Cargo.toml package.metadata.msrv = 1.51.0
kolbma Jan 17, 2022
5a27bef
build: Cargo.toml package.metadata.msrv = 1.51.0
kolbma Jan 17, 2022
a7220c9
tests: cookies_private_tests
kolbma Jan 17, 2022
b175e2a
build!: contrib/db_pools MSRV 1.53.0
kolbma Jan 18, 2022
6c3780a
build!: TlsConfig::with_ciphers() MSRV 1.53.0
kolbma Jan 18, 2022
cdc68f7
build!: build.rs require rustc 1.53.0
kolbma Jan 18, 2022
929d9d2
fix(build): typos in Cargo.toml
kolbma Jan 18, 2022
0273b43
build: output cargo/rustc versions
kolbma Jan 18, 2022
df03086
tests: trybuild ui-fail-stable stderrs updated
kolbma Jan 18, 2022
98a36a7
build: provide vscode devcontainer and Dockerfile
kolbma Jan 19, 2022
e8802e1
build: bumped to v0.5.0-rc.2
kolbma Jan 19, 2022
191d999
Merge pull request #1 from kolbma/issue-2019-try2
kolbma Jan 19, 2022
9bb7e5a
Merge pull request #2 from kolbma/issue-2063
kolbma Jan 19, 2022
780b562
build: Dockerfile cmake, make added
kolbma Jan 19, 2022
0289b85
chore(http): make clear we depend on hyper 0.14
kolbma Jan 19, 2022
a34d288
chore(contrib): bump also version
kolbma Jan 19, 2022
00633bf
chore(docker): Dockerfile cargo tools
kolbma Jan 19, 2022
f98b608
chore: devcontainer.json tab2spaces
kolbma Jan 19, 2022
07883df
tests: whitespace fix scipts/test.sh
kolbma Jan 19, 2022
3c9364d
chore(docker): mods in Docker file
kolbma Jan 20, 2022
fbe39df
tests: fix test build on musl
kolbma Jan 20, 2022
f977103
tests: fix checked whitespaces in libfuzzer-sys
kolbma Jan 20, 2022
71fb488
chore(docker): test.sh uses tput which is in ncurses
kolbma Jan 20, 2022
926c318
tests: fixes test.sh/config.sh for build lines
kolbma Jan 20, 2022
8f66bd8
tests(docker): need sqlite-dev
kolbma Jan 20, 2022
822b33f
chore(docker): bump MSRV 1.54.0
kolbma Jan 20, 2022
7bba2d1
build!: MSRV 1.54.0 because of contrib/db_pools
kolbma Jan 20, 2022
09da3e5
build: get crate chrono from git with a stable rev
kolbma Jan 20, 2022
bf3acc2
build: stay on minor version of crate quote
kolbma Jan 20, 2022
5b1414c
build: MSRV 1.54.0 - dep updates
kolbma Jan 20, 2022
8e1c3c0
chore(db_pool): mods for deadpool 0.9
kolbma Jan 20, 2022
f3faec1
build: moved diesel examples
kolbma Jan 21, 2022
49e6cda
build: use pretty_assertions 1.0
kolbma Jan 21, 2022
6923f98
build: tera 1.15 and handlebars 4.2
kolbma Jan 21, 2022
4f6ae44
build: diesel 1.4, rusqlite 0.26, r2d2_sqlite 0.19
kolbma Jan 21, 2022
e1030a6
chore: TODO x509-parser 0.12
kolbma Jan 21, 2022
ffd966b
build: dep updates
kolbma Jan 21, 2022
942e7ed
build: dep updates
kolbma Jan 21, 2022
9829ca8
build: crate log 0.4
kolbma Jan 21, 2022
d451088
chore: comment typo
kolbma Jan 21, 2022
36dd332
refactor(tests): contrib/sync_db_pools tests
kolbma Jan 21, 2022
5860ccc
tests: tests.sh extend all_compatible_features
kolbma Jan 21, 2022
9b98a38
fix: add includeSubDomains to Preload
kolbma Jan 21, 2022
23b679a
fix: doc code set context
kolbma Jan 21, 2022
29aadf2
feat: add `Request::try_local_cache()`
kolbma Jan 21, 2022
4d1ceff
chore: line longer than 100 chars
kolbma Jan 21, 2022
d82428a
chore: trailing wspace
kolbma Jan 21, 2022
636dc77
tests: fix missing &
kolbma Jan 21, 2022
df4e81b
tests: trybuild knows macro names with MSRV 1.54.0
kolbma Jan 21, 2022
8445e1e
Add documentation
the10thWiz Jan 21, 2022
94aeb72
build: crate x509-parser 0.12
kolbma Jan 21, 2022
1802dad
feat: mtls::Certificate::find_extension(oid)
kolbma Jan 21, 2022
81d0995
refactor: crate tokio-rustls 0.23
kolbma Jan 22, 2022
eaee81a
refactor: replace deprecated array::IntoIter
kolbma Jan 22, 2022
cb74a4d
build: crate tokio 1.15
kolbma Jan 22, 2022
5aa1b2f
feat: make blocking_workers configurable
kolbma Jan 22, 2022
83a9ddf
fix(docs): template engines handlebars
kolbma Jan 22, 2022
e4931d2
fix(docs): 3-overview.md be too much
kolbma Jan 22, 2022
3b83521
docs: link to wikipedia for iff
kolbma Jan 22, 2022
cfff53f
fix: use std::result::Result in `context!`
kolbma Jan 22, 2022
3aeee8f
chore(docs): some typos in cookie docs
kolbma Jan 22, 2022
9b662e4
chore(docs): trailing wspace
kolbma Jan 22, 2022
42c7e50
fix(docs): url to owasp.org path traversal doc
kolbma Jan 22, 2022
17cf42f
fix: `launch_info!` should be logged with info level
kolbma Jan 22, 2022
0bc8e33
docs: format overview.toml
kolbma Jan 22, 2022
ef3580a
fix(docs): limit config name is form not forms
kolbma Jan 22, 2022
91dab71
fix(msgpack): use `msgpack::to_vec()` not `rmp_serde::to_vec()`
kolbma Jan 22, 2022
e6bd00c
feat: added feature msgpack-compact
kolbma Jan 22, 2022
d9c1af7
chore(docs): trailing wspace
kolbma Jan 22, 2022
d1f47cd
chore: typo in suggestion.md
kolbma Jan 22, 2022
1fa6088
docs: listed feature msgpack-compact
kolbma Jan 22, 2022
bbb4705
test(msgpack): missing derive(Debug)
kolbma Jan 23, 2022
692544c
chore: follow clippy suggests
kolbma Jan 23, 2022
b7e32a5
chore: certificates only used with tls feature
kolbma Jan 23, 2022
8bfea1d
chore: certificates only used with tls feature
kolbma Jan 23, 2022
cf1b353
chore: trailing wspace
kolbma Jan 23, 2022
bd8edea
chore: handle unused warning without tls feature
kolbma Jan 23, 2022
6b39467
fix(examples): todo example flash
kolbma Jan 23, 2022
cd1222b
chore: dummy use of DatabaseInvocation::structure
kolbma Jan 23, 2022
eae8ef3
chore: TODO for Metadata::query_segs
kolbma Jan 23, 2022
03ca18d
chore(examples): no unused warnings
kolbma Jan 23, 2022
8bc3be8
build: set publish = false for diesel tests
kolbma Jan 23, 2022
b0265d1
tests: provide separate ui-fail-msrv dirs
kolbma Jan 23, 2022
a626651
tests: need to unwrap Option<bool>
kolbma Jan 23, 2022
66fb6ec
tests: stderr output for stable
kolbma Jan 23, 2022
363b4ac
tests: provide codegen-diesel-tests lib target
kolbma Jan 23, 2022
bf5e36a
tests: path changed for ui-fail-msrv
kolbma Jan 23, 2022
3c16d72
tests: test.sh run contrib codegen tests
kolbma Jan 23, 2022
cf29943
tests: trybuild stable starts with 1.56.0
kolbma Jan 24, 2022
e365ab9
bench: added criterion feature html_reports
kolbma Jan 24, 2022
d5935bc
tests: hide unused fields
kolbma Jan 24, 2022
87464f9
tests: repair sse test heartbeat race
kolbma Jan 24, 2022
d97abd4
tests: workaround for line len limit
kolbma Jan 24, 2022
022b424
docs: update links to versioned API docs.rs
kolbma Jan 24, 2022
5d785ac
tests: ui fail stderr patch
kolbma Jan 24, 2022
133e9e3
chore: Metadata partly unused allow(dead_code)
kolbma Jan 25, 2022
3aa7779
tests: trybuild codegen stderr patches
kolbma Jan 26, 2022
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
110 changes: 110 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
# Merged with devcontainer from Microsoft VSCode
# https://github.com/microsoft/vscode-dev-containers/tree/v0.212.0/containers/alpine/.devcontainer

ARG VARIANT="3.15"
FROM alpine:${VARIANT}

ARG USERNAME=rocket
ARG USER_UID=10000
ARG USER_GID=$USER_UID
ARG INSTALL_ZSH="false"

ARG ROCKET_MSRV="1.54.0"
ARG ROCKET_REPO="https://github.com/rocket-org/Rocket.git"
ARG ROCKET_VOLUME="/home/$USERNAME/Rocket"

COPY library-scripts/*.sh library-scripts/*.env /tmp/library-scripts/

RUN echo "Updating packages..." \
&& apk update --no-cache \
&& echo "Executing common-alpine.sh..." \
&& ash /tmp/library-scripts/common-alpine.sh "${INSTALL_ZSH}" "${USERNAME}" "${USER_UID}" "${USER_GID}" \
&& rm -rf /tmp/library-scripts \
&& usermod -p $(echo "$RANDOM-x-$RANDOM-x-$RANDOM-x-$RANDOM-x-$RANDOM" | hexdump -e '"%02x"') "${USERNAME}" \
&& echo "" > /etc/motd \
&& echo "Installing required packages..." \
&& apk add -U --no-cache bash build-base cmake curl-dev lldb mariadb-dev \
musl-dev ncurses openssh-server openssh-keygen \
openssl-dev perl pkgconf-dev postgresql-dev python3 \
sqlite-dev \
&& sed -i -e 's/^[#]Port .*$/Port 2222/' \
-e 's/^[#]PermitRootLogin .*$/PermitRootLogin no/' \
-e 's/^[#]PasswordAuthentication .*$/PasswordAuthentication no/' \
/etc/ssh/sshd_config \
&& mkdir "${ROCKET_VOLUME}" \
&& chown $USER_UID:$USER_GID "${ROCKET_VOLUME}" \
&& chmod 0755 "${ROCKET_VOLUME}" \
&& umask 077 && for ciph in rsa ecdsa ed25519 ; do \
ssh-keygen -f /etc/ssh/ssh_host_${ciph}_key -t "$ciph" -N "" || exit 1 ; \
done \
&& exit 0

EXPOSE 2222
CMD ["sudo", "/usr/sbin/sshd", "-D"]

USER rocket
WORKDIR /home/rocket

RUN echo "Installing rustup..." \
&& curl -sSf -o /tmp/rustup-init https://sh.rustup.rs \
&& sh /tmp/rustup-init -y -c rust-docs,rust-src,rust-analysis,clippy \
&& rm /tmp/rustup-init \
&& source $HOME/.cargo/env \
&& echo "Installing rust beta..." \
&& rustup toolchain install beta \
&& echo "Installing rust nightly..." \
&& rustup toolchain install --force nightly \
&& echo "Installing rust MSRV ${ROCKET_MSRV}..." \
&& rustup toolchain install "${ROCKET_MSRV}" \
&& echo "Checking rust installation..." \
&& rustc --version && cargo --version \
&& rustc +beta --version && cargo +beta --version \
&& rustc +nightly --version && cargo +nightly --version \
&& rustc +${ROCKET_MSRV} --version && cargo +${ROCKET_MSRV} --version \
&& rustup default ${ROCKET_MSRV} \
&& echo "This needs now some time here... please be patient..." \
&& exit 0

RUN echo "Cloning Rocket Github repository..." ; \
[ -d "${ROCKET_VOLUME}/.git" ] \
&& echo "Directory \"${ROCKET_VOLUME}\" exists... skipping clone." ; \
[ ! -d "${ROCKET_VOLUME}/.git" ] \
&& { git clone "${ROCKET_REPO}" || exit 1 ; } ; \
exit 0

VOLUME /home/rocket/Rocket

RUN echo "Installing tools with cargo..." \
&& source $HOME/.cargo/env \
|| exit 1 ; \
echo "Cargo config crt-static = false" \
&& echo -e "\n[target.x86_64-unknown-linux-musl]\nrustflags = [\"-C\", \"target-feature=-crt-static\"]\n" >> $HOME/.cargo/config.toml \
|| exit 1 ; \
no_sccache_cleanup=0 ; \
[ -d "$HOME/.cache/sccache" ] \
&& no_sccache_cleanup=1 ; \
cargo +stable install sccache \
&& echo "Config sccache..." \
&& echo -e "\n[build]\nrustc-wrapper = \"$HOME/.cargo/bin/sccache\"\n" >> $HOME/.cargo/config.toml \
&& echo "Cargo installing..." \
&& cargo +stable install cargo-audit cargo-binutils cargo-cache cargo-crev cargo-duplicates \
cargo-expand cargo-license cargo-msrv cargo-outdated cargo-trim cargo-update \
drill fd-find flamegraph sd \
&& echo "Cleanup..." \
&& cargo +stable cache -a \
|| exit 1 ; \
[ "$no_sccache_cleanup" -ne 1 ] \
&& rm -r $HOME/.cache/sccache/* \
|| exit 1 ; \
exit 0

VOLUME /home/rocket/.cache/sccache

RUN ssh-keygen -t ed25519 -f ~/.ssh/id_ed25519 \
&& cat ~/.ssh/id_ed25519.pub >> ~/.ssh/authorized_keys \
&& echo "" \
&& echo "============================================================================" \
&& echo "============== Login with user $USERNAME and this openssh key ==============" \
&& cat ~/.ssh/id_ed25519 \
&& echo "============================================================================" \
&& exit 0
34 changes: 34 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
// https://github.com/microsoft/vscode-dev-containers/tree/v0.209.6/containers/alpine
{
"name": "Rocket-Alpine-3_15",
"build": {
"dockerfile": "Dockerfile",
// Update 'VARIANT' to pick an Alpine version: 3.12, 3.13, 3.14, 3.15
"args": { "VARIANT": "3.15" }
},

// Set *default* container specific settings.json values on container create.
"settings": {},

// Add the IDs of extensions you want installed when the container is created.
// Note that some extensions may not work in Alpine Linux. See https://aka.ms/vscode-remote/linux.
"extensions": [
"ms-vscode-remote.remote-containers",
"matklad.rust-analyzer",
"serayuzgur.crates",
"vadimcn.vscode-lldb"
],

// Use 'forwardPorts' to make a list of ports inside the container available locally.
"forwardPorts": [2222, 8000],

// Use 'postCreateCommand' to run commands after the container is created.
// "postCreateCommand": "uname -a",

// Replace when using a ptrace-based debugger like C++, Go, and Rust
// "runArgs": [ "--init", "--cap-add=SYS_PTRACE", "--security-opt", "seccomp=unconfined" ],

// Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
"remoteUser": "rocket"
}
Loading