-
Notifications
You must be signed in to change notification settings - Fork 89
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
0.3.0-beta.14
perseus deploy
fails consistently
#69
Comments
Okay that's really weird, I'll debug this ASAP. I haven't updated the size optimisations plugin yet for beta 14, but that will happen very soon. Not sure what's going on here though yet... |
Btw, you don't need to add those size optimizations to the root |
I genuinely have no clue what is happening here yet, but could you try without size optimizations as well and see what happens then? |
I think the issue with On this computer I ran 3 build tests. Results with 1st Deployment test # get the base image
FROM rust:1.55-slim AS build
# install build dependencies
RUN apt update \
&& apt install -y --no-install-recommends lsb-release apt-transport-https \
build-essential curl
# vars
ENV PERSEUS_VERSION=0.3.0-beta.14 \
WEE_ALLOC_VERSION=0.4
# prepare root project dir
WORKDIR /app
# download the target for wasm
RUN rustup target add wasm32-unknown-unknown
# install wasm-pack
RUN cargo install wasm-pack
# retrieve the src dir
RUN curl https://codeload.github.com/arctic-hen7/perseus/tar.gz/main | tar -xz --strip=2 perseus-main/examples/tiny
# go to src dir
WORKDIR /app/tiny
# install perseus-cli
RUN cargo install perseus-cli --version $PERSEUS_VERSION
# clean app
RUN perseus clean
# specify deps in app config
RUN sed -i s"/perseus = .*/perseus = \"${PERSEUS_VERSION}\"/" ./Cargo.toml \
&& sed -i "/\[dependencies\]/a wee_alloc = \"${WEE_ALLOC_VERSION}\"" ./Cargo.toml \
&& cat ./Cargo.toml
# modify and prepend lib.rs
RUN sed -i s'/"Hello World!"/"世界您好 !"/' ./src/lib.rs \
&& echo '#[global_allocator] \n\
static ALLOC: wee_alloc::WeeAlloc = wee_alloc::WeeAlloc::INIT; \n\
' | cat - ./src/lib.rs > ./src/lib.rs.tmp \
&& mv ./src/lib.rs.tmp ./src/lib.rs \
&& cat ./src/lib.rs
# prep and eject app
RUN perseus prep && perseus eject
# adjust and append perseus config
RUN sed -i s"/perseus = .*/perseus = \"${PERSEUS_VERSION}\"/" .perseus/Cargo.toml \
&& echo ' \n\n\
[profile.release] \n\
codegen-units = 1 \n\
opt-level = "s" ' >> .perseus/Cargo.toml \
&& cat .perseus/Cargo.toml
# deploy app
RUN perseus deploy
# prepare deployment image
FROM bitnami/minideb:buster
WORKDIR /app
COPY --from=build /app/tiny/pkg /app/
ENV PERSEUS_STANDALONE=true
ENV HOST=0.0.0.0
CMD ["./server"] Docker build output ...
Step 9/21 : RUN cargo install perseus-cli --version $PERSEUS_VERSION
---> Running in 6d83d5500ebc
Downloading crates ...
Downloaded perseus-cli v0.3.0-beta.14
Updating crates.io index
Installing perseus-cli v0.3.0-beta.14
Downloading crates ...
Downloaded include_dir_impl v0.6.2
Downloaded clap_derive v3.0.0-beta.5
Downloaded number_prefix v0.4.0
Downloaded os_str_bytes v4.2.0
Downloaded strsim v0.10.0
Downloaded cargo_toml v0.9.2
Downloaded fs_extra v1.2.0
Downloaded console v0.14.1
Downloaded fmterr v0.1.1
Downloaded indicatif v0.17.0-beta.1
Downloaded clap v3.0.0-beta.5
Downloaded textwrap v0.14.2
Downloaded proc-macro-hack v0.5.19
Downloaded glob v0.3.0
Downloaded anyhow v1.0.44
Downloaded include_dir v0.6.2
Compiling proc-macro2 v1.0.32
Compiling unicode-xid v0.2.2
Compiling version_check v0.9.3
Compiling syn v1.0.81
Compiling libc v0.2.105
Compiling serde v1.0.130
Compiling proc-macro-hack v0.5.19
Compiling memchr v2.4.1
Compiling anyhow v1.0.44
Compiling autocfg v1.0.1
Compiling serde_derive v1.0.130
Compiling unicode-segmentation v1.8.0
Compiling ryu v1.0.5
Compiling unicode-width v0.1.9
Compiling regex-syntax v0.6.25
Compiling lazy_static v1.4.0
Compiling hashbrown v0.11.2
Compiling serde_json v1.0.68
Compiling once_cell v1.8.0
Compiling strsim v0.10.0
Compiling itoa v0.4.8
Compiling glob v0.3.0
Compiling termcolor v1.1.2
Compiling number_prefix v0.4.0
Compiling bitflags v1.3.2
Compiling fmterr v0.1.1
Compiling fs_extra v1.2.0
Compiling proc-macro-error-attr v1.0.4
Compiling proc-macro-error v1.0.4
Compiling unicase v2.6.0
Compiling indexmap v1.7.0
Compiling heck v0.3.3
Compiling textwrap v0.14.2
Compiling regex v1.5.4
Compiling quote v1.0.10
Compiling terminal_size v0.1.17
Compiling atty v0.2.14
Compiling toml v0.5.8
Compiling os_str_bytes v4.2.0
Compiling console v0.15.0
Compiling console v0.14.1
Compiling indicatif v0.17.0-beta.1
Compiling include_dir_impl v0.6.2
Compiling thiserror-impl v1.0.30
Compiling clap_derive v3.0.0-beta.5
Compiling include_dir v0.6.2
Compiling cargo_toml v0.9.2
Compiling thiserror v1.0.30
Compiling clap v3.0.0-beta.5
Compiling perseus-cli v0.3.0-beta.14
Finished release [optimized] target(s) in 5m 00s
Installing /usr/local/cargo/bin/perseus
Installed package `perseus-cli v0.3.0-beta.14` (executable `perseus`)
Removing intermediate container 6d83d5500ebc
---> 42b874c43d72
Step 10/21 : RUN perseus clean
---> Running in 8276537efeea
Removing intermediate container 8276537efeea
---> 759b86aac382
Step 11/21 : RUN sed -i s"/perseus = .*/perseus = \"${PERSEUS_VERSION}\"/" ./Cargo.toml && sed -i "/\[dependencies\]/a wee_alloc = \"${WEE_ALLOC_VERSION}\"" ./Cargo.toml && cat ./Cargo.toml
---> Running in e356e35ab68d
[package]
name = "perseus-example-tiny"
version = "0.3.0-beta.14"
edition = "2018"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
wee_alloc = "0.4"
perseus = "0.3.0-beta.14"
sycamore = "0.6"
Removing intermediate container e356e35ab68d
---> 1d966e205357
Step 12/21 : RUN sed -i s'/"Hello World!"/"世界您好 !"/' ./src/lib.rs && echo '#[global_allocator] \nstatic ALLOC: wee_alloc::WeeAlloc = wee_alloc::WeeAlloc::INIT; \n' | cat - ./src/lib.rs > ./src/lib.rs.tmp && mv ./src/lib.rs.tmp ./src/lib.rs && cat ./src/lib.rs
---> Running in 440c8673f35d
#[global_allocator]
static ALLOC: wee_alloc::WeeAlloc = wee_alloc::WeeAlloc::INIT;
use perseus::{define_app, ErrorPages, Template};
use sycamore::template;
define_app! {
templates: [
Template::<G>::new("index").template(|_| {
template! {
p { "世界您好 !" }
}
})
],
error_pages: ErrorPages::new(|url, status, err, _| {
template! {
p { (format!("An error with HTTP code {} occurred at '{}': '{}'.", status, url, err)) }
}
})
}
Removing intermediate container 440c8673f35d
---> 1da6baef2497
Step 13/21 : RUN perseus prep && perseus eject
---> Running in c185db7adc71
Removing intermediate container c185db7adc71
---> bf4ad85b25a3
Step 14/21 : RUN sed -i s"/perseus = .*/perseus = \"${PERSEUS_VERSION}\"/" .perseus/Cargo.toml && echo ' \n\n[profile.release] \ncodegen-units = 1 \nopt-level = "s" ' >> .perseus/Cargo.toml && cat .perseus/Cargo.toml
---> Running in 2b385fa587f1
# This crate defines the user's app in terms that Wasm can understand, making development significantly simpler.
# IMPORTANT: spacing matters in this file for runtime replacements, do NOT change it!
[package]
name = "perseus-engine"
version = "0.3.0-beta.14"
edition = "2018"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
# We alias here because the package name will change based on whatever's in the user's manifest
app = { package = "perseus-example-tiny", path = "../" }
perseus = "0.3.0-beta.14"
sycamore = { version = "0.6", features = ["ssr"] }
sycamore-router = "0.6"
web-sys = { version = "0.3", features = ["Event", "Headers", "Request", "RequestInit", "RequestMode", "Response", "ReadableStream", "Window"] }
wasm-bindgen = "0.2"
wasm-bindgen-futures = "0.4"
console_error_panic_hook = "0.1.6"
# This section is needed for Wasm Pack (which we use instead of Trunk for flexibility)
[lib]
crate-type = ["cdylib", "rlib"]
[workspace]
[profile.release]
codegen-units = 1
opt-level = "s"
Removing intermediate container 2b385fa587f1
---> 8a3f1673a18d
Step 15/21 : RUN perseus deploy
---> Running in 5d58d3c6a7b8
Error: couldn't move `.perseus/pkg/` to `.perseus/dist/pkg/` (run `perseus clean` if this persists)
Caused by:
Invalid cross-device link (os error 18)
The command '/bin/sh -c perseus deploy' returned a non-zero code: 1 2nd Deployment test # get the base image
FROM rust:1.55-slim AS build
# install build dependencies
RUN apt update \
&& apt install -y --no-install-recommends lsb-release apt-transport-https \
build-essential curl
# vars
ENV PERSEUS_VERSION=0.3.0-beta.14
# prepare root project dir
WORKDIR /app
# download the target for wasm
RUN rustup target add wasm32-unknown-unknown
# install wasm-pack
RUN cargo install wasm-pack
# retrieve the src dir
RUN curl https://codeload.github.com/arctic-hen7/perseus/tar.gz/main | tar -xz --strip=2 perseus-main/examples/tiny
# go to src dir
WORKDIR /app/tiny
# install perseus-cli
RUN cargo install perseus-cli --version $PERSEUS_VERSION
# clean app
RUN perseus clean
# specify deps in app config
RUN sed -i s"/perseus = .*/perseus = \"${PERSEUS_VERSION}\"/" ./Cargo.toml \
&& cat ./Cargo.toml
# modify and prepend lib.rs
RUN sed -i s'/"Hello World!"/"世界您好 !"/' ./src/lib.rs \
&& cat ./src/lib.rs
# prep and eject app
RUN perseus prep && perseus eject
# adjust and append perseus config
RUN sed -i s"/perseus = .*/perseus = \"${PERSEUS_VERSION}\"/" .perseus/Cargo.toml \
&& cat .perseus/Cargo.toml
# deploy app
RUN perseus deploy
# prepare deployment image
FROM bitnami/minideb:buster
WORKDIR /app
COPY --from=build /app/tiny/pkg /app/
ENV PERSEUS_STANDALONE=true
ENV HOST=0.0.0.0
CMD ["./server"] Docker build output ...
Step 9/21 : RUN cargo install perseus-cli --version $PERSEUS_VERSION
---> Running in dba48af18922
Downloading crates ...
Downloaded perseus-cli v0.3.0-beta.14
Updating crates.io index
Installing perseus-cli v0.3.0-beta.14
Downloading crates ...
Downloaded console v0.14.1
Downloaded fs_extra v1.2.0
Downloaded strsim v0.10.0
Downloaded indicatif v0.17.0-beta.1
Downloaded clap v3.0.0-beta.5
Downloaded cargo_toml v0.9.2
Downloaded anyhow v1.0.44
Downloaded os_str_bytes v4.2.0
Downloaded number_prefix v0.4.0
Downloaded textwrap v0.14.2
Downloaded proc-macro-hack v0.5.19
Downloaded clap_derive v3.0.0-beta.5
Downloaded glob v0.3.0
Downloaded include_dir_impl v0.6.2
Downloaded fmterr v0.1.1
Downloaded include_dir v0.6.2
Compiling proc-macro2 v1.0.32
Compiling unicode-xid v0.2.2
Compiling syn v1.0.81
Compiling version_check v0.9.3
Compiling libc v0.2.105
Compiling serde v1.0.130
Compiling proc-macro-hack v0.5.19
Compiling anyhow v1.0.44
Compiling autocfg v1.0.1
Compiling memchr v2.4.1
Compiling unicode-segmentation v1.8.0
Compiling ryu v1.0.5
Compiling serde_derive v1.0.130
Compiling regex-syntax v0.6.25
Compiling lazy_static v1.4.0
Compiling unicode-width v0.1.9
Compiling serde_json v1.0.68
Compiling once_cell v1.8.0
Compiling hashbrown v0.11.2
Compiling termcolor v1.1.2
Compiling itoa v0.4.8
Compiling number_prefix v0.4.0
Compiling strsim v0.10.0
Compiling bitflags v1.3.2
Compiling glob v0.3.0
Compiling fmterr v0.1.1
Compiling fs_extra v1.2.0
Compiling proc-macro-error-attr v1.0.4
Compiling proc-macro-error v1.0.4
Compiling unicase v2.6.0
Compiling indexmap v1.7.0
Compiling heck v0.3.3
Compiling textwrap v0.14.2
Compiling regex v1.5.4
Compiling quote v1.0.10
Compiling terminal_size v0.1.17
Compiling atty v0.2.14
Compiling toml v0.5.8
Compiling os_str_bytes v4.2.0
Compiling console v0.15.0
Compiling console v0.14.1
Compiling indicatif v0.17.0-beta.1
Compiling include_dir_impl v0.6.2
Compiling thiserror-impl v1.0.30
Compiling clap_derive v3.0.0-beta.5
Compiling include_dir v0.6.2
Compiling thiserror v1.0.30
Compiling clap v3.0.0-beta.5
Compiling cargo_toml v0.9.2
Compiling perseus-cli v0.3.0-beta.14
Finished release [optimized] target(s) in 7m 24s
Installing /usr/local/cargo/bin/perseus
Installed package `perseus-cli v0.3.0-beta.14` (executable `perseus`)
Removing intermediate container dba48af18922
---> 1d229f245f2d
Step 10/21 : RUN perseus clean
---> Running in e6b34dae74d4
Removing intermediate container e6b34dae74d4
---> fcab3999574d
Step 11/21 : RUN sed -i s"/perseus = .*/perseus = \"${PERSEUS_VERSION}\"/" ./Cargo.toml && cat ./Cargo.toml
---> Running in 99da3d87bd97
[package]
name = "perseus-example-tiny"
version = "0.3.0-beta.14"
edition = "2018"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
perseus = "0.3.0-beta.14"
sycamore = "0.6"
Removing intermediate container 99da3d87bd97
---> 2bcc3d47c4fe
Step 12/21 : RUN sed -i s'/"Hello World!"/"世界您好 !"/' ./src/lib.rs && cat ./src/lib.rs
---> Running in 173eb3f2262e
use perseus::{define_app, ErrorPages, Template};
use sycamore::template;
define_app! {
templates: [
Template::<G>::new("index").template(|_| {
template! {
p { "世界您好 !" }
}
})
],
error_pages: ErrorPages::new(|url, status, err, _| {
template! {
p { (format!("An error with HTTP code {} occurred at '{}': '{}'.", status, url, err)) }
}
})
}
Removing intermediate container 173eb3f2262e
---> 49b0ca56ef8c
Step 13/21 : RUN perseus prep && perseus eject
---> Running in b917c7b5e644
Removing intermediate container b917c7b5e644
---> 84af82b07e83
Step 14/21 : RUN sed -i s"/perseus = .*/perseus = \"${PERSEUS_VERSION}\"/" .perseus/Cargo.toml && cat .perseus/Cargo.toml
---> Running in 3b9b6b2174ab
# This crate defines the user's app in terms that Wasm can understand, making development significantly simpler.
# IMPORTANT: spacing matters in this file for runtime replacements, do NOT change it!
[package]
name = "perseus-engine"
version = "0.3.0-beta.14"
edition = "2018"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
# We alias here because the package name will change based on whatever's in the user's manifest
app = { package = "perseus-example-tiny", path = "../" }
perseus = "0.3.0-beta.14"
sycamore = { version = "0.6", features = ["ssr"] }
sycamore-router = "0.6"
web-sys = { version = "0.3", features = ["Event", "Headers", "Request", "RequestInit", "RequestMode", "Response", "ReadableStream", "Window"] }
wasm-bindgen = "0.2"
wasm-bindgen-futures = "0.4"
console_error_panic_hook = "0.1.6"
# This section is needed for Wasm Pack (which we use instead of Trunk for flexibility)
[lib]
crate-type = ["cdylib", "rlib"]
[workspace]Removing intermediate container 3b9b6b2174ab
---> aab1cc44d562
Step 15/21 : RUN perseus deploy
---> Running in 4e8513023820
Error: couldn't move `.perseus/pkg/` to `.perseus/dist/pkg/` (run `perseus clean` if this persists)
Caused by:
Invalid cross-device link (os error 18)
The command '/bin/sh -c perseus deploy' returned a non-zero code: 1 3rd Deployment test # get the base image
FROM rust:1.55-slim AS build
# install build dependencies
RUN apt update \
&& apt install -y --no-install-recommends lsb-release apt-transport-https \
build-essential curl
# vars
ENV PERSEUS_VERSION=0.3.0-beta.13
# prepare root project dir
WORKDIR /app
# download the target for wasm
RUN rustup target add wasm32-unknown-unknown
# install wasm-pack
RUN cargo install wasm-pack
# retrieve the src dir
RUN curl https://codeload.github.com/arctic-hen7/perseus/tar.gz/main | tar -xz --strip=2 perseus-main/examples/tiny
# go to src dir
WORKDIR /app/tiny
# install perseus-cli
RUN cargo install perseus-cli --version $PERSEUS_VERSION
# clean app
RUN perseus clean
# specify deps in app config
RUN sed -i s"/perseus = .*/perseus = \"${PERSEUS_VERSION}\"/" ./Cargo.toml \
&& cat ./Cargo.toml
# modify and prepend lib.rs
RUN sed -i s'/"Hello World!"/"世界您好 !"/' ./src/lib.rs \
&& cat ./src/lib.rs
# prep and eject app
RUN perseus prep && perseus eject
# adjust and append perseus config
RUN sed -i s"/perseus = .*/perseus = \"${PERSEUS_VERSION}\"/" .perseus/Cargo.toml \
&& cat .perseus/Cargo.toml
# deploy app
RUN perseus deploy
# prepare deployment image
FROM bitnami/minideb:buster
WORKDIR /app
COPY --from=build /app/tiny/pkg /app/
ENV PERSEUS_STANDALONE=true
ENV HOST=0.0.0.0
CMD ["./server"] Docker build output ...
Step 9/21 : RUN cargo install perseus-cli --version $PERSEUS_VERSION
---> Running in f60ae83aa53f
Downloading crates ...
Downloaded perseus-cli v0.3.0-beta.13
Updating crates.io index
Installing perseus-cli v0.3.0-beta.13
Downloading crates ...
Downloaded cargo_toml v0.9.2
Downloaded include_dir v0.6.2
Downloaded fs_extra v1.2.0
Downloaded anyhow v1.0.44
Downloaded glob v0.3.0
Downloaded number_prefix v0.4.0
Downloaded strsim v0.10.0
Downloaded textwrap v0.14.2
Downloaded os_str_bytes v4.2.0
Downloaded include_dir_impl v0.6.2
Downloaded proc-macro-hack v0.5.19
Downloaded clap_derive v3.0.0-beta.5
Downloaded indicatif v0.17.0-beta.1
Downloaded console v0.14.1
Downloaded clap v3.0.0-beta.5
Downloaded fmterr v0.1.1
Compiling proc-macro2 v1.0.32
Compiling unicode-xid v0.2.2
Compiling version_check v0.9.3
Compiling syn v1.0.81
Compiling libc v0.2.105
Compiling serde v1.0.130
Compiling proc-macro-hack v0.5.19
Compiling anyhow v1.0.44
Compiling memchr v2.4.1
Compiling autocfg v1.0.1
Compiling serde_derive v1.0.130
Compiling unicode-width v0.1.9
Compiling ryu v1.0.5
Compiling unicode-segmentation v1.8.0
Compiling regex-syntax v0.6.25
Compiling lazy_static v1.4.0
Compiling hashbrown v0.11.2
Compiling serde_json v1.0.68
Compiling once_cell v1.8.0
Compiling itoa v0.4.8
Compiling number_prefix v0.4.0
Compiling glob v0.3.0
Compiling termcolor v1.1.2
Compiling bitflags v1.3.2
Compiling strsim v0.10.0
Compiling fs_extra v1.2.0
Compiling fmterr v0.1.1
Compiling proc-macro-error-attr v1.0.4
Compiling proc-macro-error v1.0.4
Compiling unicase v2.6.0
Compiling indexmap v1.7.0
Compiling textwrap v0.14.2
Compiling heck v0.3.3
Compiling regex v1.5.4
Compiling quote v1.0.10
Compiling terminal_size v0.1.17
Compiling atty v0.2.14
Compiling toml v0.5.8
Compiling os_str_bytes v4.2.0
Compiling console v0.15.0
Compiling console v0.14.1
Compiling indicatif v0.17.0-beta.1
Compiling include_dir_impl v0.6.2
Compiling thiserror-impl v1.0.30
Compiling clap_derive v3.0.0-beta.5
Compiling include_dir v0.6.2
Compiling cargo_toml v0.9.2
Compiling thiserror v1.0.30
Compiling clap v3.0.0-beta.5
Compiling perseus-cli v0.3.0-beta.13
Finished release [optimized] target(s) in 5m 44s
Installing /usr/local/cargo/bin/perseus
Installed package `perseus-cli v0.3.0-beta.13` (executable `perseus`)
Removing intermediate container f60ae83aa53f
---> d1c838333cbe
Step 10/21 : RUN perseus clean
---> Running in db120e69c4df
Removing intermediate container db120e69c4df
---> bd03e1889dcc
Step 11/21 : RUN sed -i s"/perseus = .*/perseus = \"${PERSEUS_VERSION}\"/" ./Cargo.toml && cat ./Cargo.toml
---> Running in 2f07d11c1468
[package]
name = "perseus-example-tiny"
version = "0.3.0-beta.14"
edition = "2018"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
perseus = "0.3.0-beta.13"
sycamore = "0.6"
Removing intermediate container 2f07d11c1468
---> d25865ed3043
Step 12/21 : RUN sed -i s'/"Hello World!"/"世界您好 !"/' ./src/lib.rs && cat ./src/lib.rs
---> Running in 2d2ad2696609
use perseus::{define_app, ErrorPages, Template};
use sycamore::template;
define_app! {
templates: [
Template::<G>::new("index").template(|_| {
template! {
p { "世界您好 !" }
}
})
],
error_pages: ErrorPages::new(|url, status, err, _| {
template! {
p { (format!("An error with HTTP code {} occurred at '{}': '{}'.", status, url, err)) }
}
})
}
Removing intermediate container 2d2ad2696609
---> ca732bec2609
Step 13/21 : RUN perseus prep && perseus eject
---> Running in fe63468bb46e
Removing intermediate container fe63468bb46e
---> a658a2ccbe00
Step 14/21 : RUN sed -i s"/perseus = .*/perseus = \"${PERSEUS_VERSION}\"/" .perseus/Cargo.toml && cat .perseus/Cargo.toml
---> Running in 7ef5af209c78
# This crate defines the user's app in terms that Wasm can understand, making development significantly simpler.
# IMPORTANT: spacing matters in this file for runtime replacements, do NOT change it!
[package]
name = "perseus-engine"
version = "0.3.0-beta.13"
edition = "2018"
default-run = "perseus-builder"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
# We alias here because the package name will change based on whatever's in the user's manifest
app = { package = "perseus-example-tiny", path = "../" }
perseus = "0.3.0-beta.13"
sycamore = { version = "0.6", features = ["ssr"] }
sycamore-router = "0.6"
web-sys = { version = "0.3", features = ["Event", "Headers", "Request", "RequestInit", "RequestMode", "Response", "ReadableStream", "Window"] }
wasm-bindgen = { version = "0.2", features = ["serde-serialize"] }
wasm-bindgen-futures = "0.4"
serde = { version = "1", features = ["derive"] }
serde_json = "1" # Possibly don't need?
console_error_panic_hook = "0.1.6"
urlencoding = "2.1"
futures = "0.3"
fs_extra = "1"
lazy_static = "1"
# This section is needed for Wasm Pack (which we use instead of Trunk for flexibility)
[lib]
crate-type = ["cdylib", "rlib"]
# We define a binary for building, serving, and doing both
[[bin]]
name = "perseus-builder"
path = "src/bin/build.rs"
[[bin]]
name = "perseus-exporter"
path = "src/bin/export.rs"
[[bin]]
name = "perseus-tinker" # Yes, the noun is 'tinker', not 'tinkerer'
path = "src/bin/tinker.rs"
[workspace]
members = [ "server" ]Removing intermediate container 7ef5af209c78
---> 402e31cdda20
Step 15/21 : RUN perseus deploy
---> Running in 8bb9ce287d87
Updating crates.io index
Blocking waiting for file lock on package cache
Blocking waiting for file lock on package cache
Downloading crates ...
Downloaded darling_core v0.13.0
Downloaded bytes v1.1.0
Downloaded async-trait v0.1.51
Downloaded darling v0.13.0
Downloaded ahash v0.7.6
Downloaded darling_macro v0.13.0
Downloaded lexical v6.0.1
Downloaded js-sys v0.3.55
Downloaded futures-sink v0.3.17
Downloaded futures v0.3.17
Downloaded perseus-macro v0.3.0-beta.14
Downloaded pin-utils v0.1.0
Downloaded lexical-util v0.8.1
Downloaded static_assertions v1.1.0
Downloaded utf8-width v0.1.5
Downloaded urlencoding v2.1.0
Downloaded sycamore-router v0.6.3
Downloaded wasm-bindgen-shared v0.2.78
Downloaded wasm-bindgen-macro v0.2.78
Downloaded wasm-bindgen-futures v0.4.28
Downloaded sycamore-router-macro v0.6.3
Downloaded sycamore-reactive v0.6.3
Downloaded sycamore v0.6.3
Downloaded sycamore-macro v0.6.3
Downloaded minimal-lexical v0.1.4
Downloaded lexical-write-integer v0.8.0
Downloaded lexical-write-float v0.8.2
Downloaded futures-util v0.3.17
Downloaded web-sys v0.3.55
Downloaded proc-macro-nested v0.1.7
Downloaded wasm-bindgen v0.2.78
Downloaded futures-task v0.3.17
Downloaded lexical-parse-integer v0.8.0
Downloaded wasm-bindgen-macro-support v0.2.78
Downloaded wasm-bindgen-backend v0.2.78
Downloaded nom v7.0.0
Downloaded bumpalo v3.8.0
Downloaded lexical-parse-float v0.8.2
Downloaded perseus v0.3.0-beta.14
Downloaded lexical-core v0.8.2
Downloaded pin-project-lite v0.2.7
Downloaded ident_case v1.0.1
Downloaded futures-channel v0.3.17
Downloaded html-escape v0.2.9
Downloaded futures-macro v0.3.17
Downloaded futures-core v0.3.17
Downloaded console_error_panic_hook v0.1.7
Downloaded futures-executor v0.3.17
Downloaded futures-io v0.3.17
Downloaded http v0.2.5
Blocking waiting for file lock on package cache
Compiling proc-macro2 v1.0.32
Compiling unicode-xid v0.2.2
Compiling syn v1.0.81
Compiling autocfg v1.0.1
Compiling serde v1.0.130
Compiling serde_derive v1.0.130
Compiling ryu v1.0.5
Compiling log v0.4.14
Compiling wasm-bindgen-shared v0.2.78
Compiling serde_json v1.0.68
Compiling cfg-if v1.0.0
Compiling lazy_static v1.4.0
Compiling bumpalo v3.8.0
Compiling version_check v0.9.3
Compiling memchr v2.4.1
Compiling itoa v0.4.8
Compiling static_assertions v1.1.0
Compiling libc v0.2.105
Compiling wasm-bindgen v0.2.78
Compiling proc-macro-hack v0.5.19
Compiling futures-core v0.3.17
Compiling futures-task v0.3.17
Compiling futures-channel v0.3.17
Compiling proc-macro-nested v0.1.7
Compiling strsim v0.10.0
Compiling once_cell v1.8.0
Compiling hashbrown v0.11.2
Compiling futures-sink v0.3.17
Compiling ident_case v1.0.1
Compiling fnv v1.0.7
Compiling smallvec v1.7.0
Compiling futures-io v0.3.17
Compiling pin-project-lite v0.2.7
Compiling minimal-lexical v0.1.4
Compiling pin-utils v0.1.0
Compiling utf8-width v0.1.5
Compiling slab v0.4.5
Compiling async-trait v0.1.51
Compiling bytes v1.1.0
Compiling urlencoding v2.1.0
Compiling fmterr v0.1.1
Compiling fs_extra v1.2.0
Compiling indexmap v1.7.0
Compiling futures-macro v0.3.17
Compiling futures-util v0.3.17
Compiling num-traits v0.2.14
Compiling num-integer v0.1.44
Compiling ahash v0.7.6
Compiling nom v7.0.0
Compiling lexical-util v0.8.1
Compiling html-escape v0.2.9
Compiling http v0.2.5
Compiling lexical-parse-integer v0.8.0
Compiling lexical-write-integer v0.8.0
Compiling quote v1.0.10
Compiling getrandom v0.2.3
Compiling time v0.1.43
Compiling lexical-parse-float v0.8.2
Compiling lexical-write-float v0.8.2
Compiling lexical-core v0.8.2
Compiling chrono v0.4.19
Compiling lexical v6.0.1
Compiling wasm-bindgen-backend v0.2.78
Compiling darling_core v0.13.0
Compiling wasm-bindgen-macro-support v0.2.78
Compiling sycamore-macro v0.6.3
Compiling sycamore-router-macro v0.6.3
Compiling thiserror-impl v1.0.30
Compiling wasm-bindgen-macro v0.2.78
Compiling darling_macro v0.13.0
Compiling thiserror v1.0.30
Compiling darling v0.13.0
Compiling futures-executor v0.3.17
Compiling futures v0.3.17
Compiling perseus-macro v0.3.0-beta.14
Compiling js-sys v0.3.55
Compiling console_error_panic_hook v0.1.7
Compiling web-sys v0.3.55
Compiling wasm-bindgen-futures v0.4.28
Compiling sycamore-reactive v0.6.3
Compiling sycamore v0.6.3
Compiling sycamore-router v0.6.3
Compiling perseus v0.3.0-beta.14
Compiling perseus-example-tiny v0.3.0-beta.14 (/app/tiny)
Compiling perseus-engine v0.3.0-beta.13 (/app/tiny/.perseus)
error[E0432]: unresolved imports `perseus::Locales`, `perseus::TemplateMap`
--> src/app.rs:8:30
|
8 | ErrorPages, GenericNode, Locales, TemplateMap,
| ^^^^^^^ ^^^^^^^^^^^ no `TemplateMap` in the root
| |
| no `Locales` in the root
|
help: a similar name exists in the module
|
8 | ErrorPages, GenericNode, locales, TemplateMap,
| ^^^^^^^
help: a similar name exists in the module
|
8 | ErrorPages, GenericNode, Locales, Template,
| ^^^^^^^^
error[E0432]: unresolved imports `perseus::app_shell`, `perseus::detect_locale`, `perseus::ClientTranslationsManager`
--> src/lib.rs:8:15
|
8 | use perseus::{app_shell, create_app_route, detect_locale, ClientTranslationsManager, DomNode};
| ^^^^^^^^^ ^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^
| | | |
| | | no `ClientTranslationsManager` in the root
| | | help: a similar name exists in the module: `client_translations_manager`
| | no `detect_locale` in the root
| no `app_shell` in the root
error[E0603]: module `error_pages` is private
--> src/lib.rs:4:14
|
4 | use perseus::error_pages::ErrorPageData;
| ^^^^^^^^^^^ private module
|
note: the module `error_pages` is defined here
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/perseus-0.3.0-beta.14/src/lib.rs:48:1
|
48 | mod error_pages;
| ^^^^^^^^^^^^^^^^
error[E0603]: module `router` is private
--> src/lib.rs:6:14
|
6 | use perseus::router::{RouteInfo, RouteVerdict};
| ^^^^^^ private module
|
note: the module `router` is defined here
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/perseus-0.3.0-beta.14/src/lib.rs:56:1
|
56 | mod router;
| ^^^^^^^^^^^
error[E0603]: module `shell` is private
--> src/lib.rs:7:14
|
7 | use perseus::shell::{checkpoint, get_initial_state, get_render_cfg, InitialState};
| ^^^^^ private module
|
note: the module `shell` is defined here
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/perseus-0.3.0-beta.14/src/lib.rs:58:1
|
58 | mod shell;
| ^^^^^^^^^^
Some errors have detailed explanations: E0432, E0603.
For more information about an error, try `rustc --explain E0432`.
error: could not compile `perseus-engine` due to 5 previous errors
Blocking waiting for file lock on package cache
Updating crates.io index
Blocking waiting for file lock on package cache
Blocking waiting for file lock on package cache
Downloading crates ...
Downloaded actix-codec v0.3.0
Downloaded lru-cache v0.1.2
Downloaded match_cfg v0.1.0
Downloaded opaque-debug v0.3.0
Downloaded linked-hash-map v0.5.4
Downloaded nom v4.2.3
Downloaded perseus-actix-web v0.3.0-beta.14
Downloaded actix-files v0.5.0
Downloaded actix-connect v2.0.0
Downloaded actix-macros v0.1.3
Downloaded actix-utils v2.0.0
Downloaded actix-tls v2.0.0
Downloaded actix-threadpool v0.3.3
Downloaded actix-router v0.2.7
Downloaded awc v2.0.3
Downloaded actix-web v3.3.2
Downloaded bytestring v1.0.0
Downloaded semver v0.11.0
Downloaded block-buffer v0.9.0
Downloaded time v0.2.27
Downloaded getrandom v0.1.16
Downloaded pin-project-internal v0.4.28
Downloaded hostname v0.3.1
Downloaded cpufeatures v0.2.1
Downloaded sha-1 v0.9.8
Downloaded signal-hook-registry v1.4.0
Downloaded tracing-futures v0.2.5
Downloaded h2 v0.2.7
Downloaded trust-dns-resolver v0.19.7
Downloaded generic-array v0.14.4
Downloaded enum-as-inner v0.3.3
Downloaded actix-rt v1.1.1
Downloaded digest v0.9.0
Downloaded cookie v0.14.4
Downloaded bytes v0.5.6
Downloaded resolv-conf v0.7.0
Downloaded rand_core v0.5.1
Downloaded derive_more v0.99.16
Downloaded tracing-core v0.1.21
Downloaded v_escape v0.15.0
Downloaded version_check v0.1.5
Downloaded typenum v1.14.0
Downloaded semver-parser v0.10.2
Downloaded standback v0.2.17
Downloaded trust-dns-proto v0.19.7
Downloaded time-macros-impl v0.1.2
Downloaded tokio-util v0.3.1
Downloaded socket2 v0.3.19
Downloaded threadpool v1.8.1
Downloaded ppv-lite86 v0.2.15
Downloaded pin-project-internal v1.0.8
Downloaded pin-project v1.0.8
Downloaded tokio v0.2.25
Downloaded v_htmlescape v0.12.0
Downloaded tracing v0.1.29
Downloaded v_escape_derive v0.8.5
Downloaded actix-testing v1.0.1
Downloaded language-tags v0.2.2
Downloaded fxhash v0.2.1
Downloaded serde_urlencoded v0.7.0
Downloaded rustc_version v0.3.3
Downloaded time-macros v0.1.1
Downloaded mio-uds v0.6.8
Downloaded base64 v0.13.0
Downloaded actix-web-codegen v0.4.0
Downloaded rand_chacha v0.2.2
Downloaded copyless v0.1.5
Downloaded actix-server v1.0.4
Downloaded pin-project-lite v0.1.12
Downloaded convert_case v0.4.0
Downloaded const_fn v0.4.8
Downloaded actix-http v2.2.1
Downloaded pin-project v0.4.28
Downloaded pest v2.1.3
Downloaded brotli-sys v0.3.2
Downloaded ucd-trie v0.1.3
Downloaded buf-min v0.4.0
Downloaded brotli2 v0.3.2
Downloaded actix-service v1.0.6
Downloaded rand v0.7.3
Blocking waiting for file lock on package cache
Blocking waiting for file lock on build directory
Compiling libc v0.2.105
Compiling futures-core v0.3.17
Compiling futures-sink v0.3.17
Compiling futures-channel v0.3.17
Compiling bytes v0.5.6
Compiling cfg-if v0.1.10
Compiling pin-project-lite v0.1.12
Compiling parking_lot_core v0.8.5
Compiling pin-project-internal v0.4.28
Compiling scopeguard v1.1.0
Compiling getrandom v0.1.16
Compiling convert_case v0.4.0
Compiling matches v0.1.9
Compiling percent-encoding v2.1.0
Compiling tinyvec_macros v0.1.0
Compiling bitflags v1.3.2
Compiling copyless v0.1.5
Compiling typenum v1.14.0
Compiling ppv-lite86 v0.2.15
Compiling either v1.6.1
Compiling unicode-segmentation v1.8.0
Compiling unicode-bidi v0.3.7
Compiling const_fn v0.4.8
Compiling match_cfg v0.1.0
Compiling cc v1.0.71
Compiling quick-error v1.2.3
Compiling version_check v0.1.5
Compiling crc32fast v1.2.1
Compiling linked-hash-map v0.5.4
Compiling encoding_rs v0.8.29
Compiling adler v1.0.2
Compiling httparse v1.5.1
Compiling regex-syntax v0.6.25
Compiling mime v0.3.16
Compiling opaque-debug v0.3.0
Compiling byteorder v1.4.3
Compiling cpufeatures v0.2.1
Compiling language-tags v0.2.2
Compiling base64 v0.13.0
Compiling v_escape v0.15.0
Compiling v_htmlescape v0.12.0
Compiling instant v0.1.12
Compiling standback v0.2.17
Compiling generic-array v0.14.4
Compiling unicase v2.6.0
Compiling time v0.2.27
Compiling cookie v0.14.4
Compiling futures-util v0.3.17
Compiling miniz_oxide v0.4.4
Compiling log v0.4.14
Compiling tracing-core v0.1.21
Compiling buf-min v0.4.0
Compiling lock_api v0.4.5
Compiling bytestring v1.0.0
Compiling form_urlencoded v1.0.1
Compiling tinyvec v1.5.0
Compiling heck v0.3.3
Compiling brotli-sys v0.3.2
Compiling nom v4.2.3
Compiling lru-cache v0.1.2
Compiling fxhash v0.2.1
Compiling unicode-normalization v0.1.19
Compiling aho-corasick v0.7.18
Compiling tracing v0.1.29
Compiling iovec v0.1.4
Compiling net2 v0.2.37
Compiling signal-hook-registry v1.4.0
Compiling num_cpus v1.13.0
Compiling getrandom v0.2.3
Compiling hostname v0.3.1
Compiling time v0.1.43
Compiling socket2 v0.3.19
Compiling idna v0.2.3
Compiling mime_guess v2.0.3
Compiling flate2 v1.0.22
Compiling regex v1.5.4
Compiling mio v0.6.23
Compiling threadpool v1.8.1
Compiling parking_lot v0.11.2
Compiling rand_core v0.5.1
Compiling ahash v0.7.6
Compiling resolv-conf v0.7.0
Compiling url v2.2.2
Compiling digest v0.9.0
Compiling block-buffer v0.9.0
Compiling derive_more v0.99.16
Compiling actix-macros v0.1.3
Compiling time-macros-impl v0.1.2
Compiling pin-project-internal v1.0.8
Compiling enum-as-inner v0.3.3
Compiling v_escape_derive v0.8.5
Compiling actix-web-codegen v0.4.0
Compiling chrono v0.4.19
Compiling brotli2 v0.3.2
Compiling mio-uds v0.6.8
Compiling rand_chacha v0.2.2
Compiling sha-1 v0.9.8
Compiling pin-project v0.4.28
Compiling time-macros v0.1.1
Compiling actix-threadpool v0.3.3
Compiling pin-project v1.0.8
Compiling tokio v0.2.25
Compiling rand v0.7.3
Compiling serde_urlencoded v0.7.0
Compiling actix-router v0.2.7
Compiling tracing-futures v0.2.5
Compiling futures-executor v0.3.17
Compiling actix-service v1.0.6
Compiling tokio-util v0.3.1
Compiling actix-rt v1.1.1
Compiling futures v0.3.17
Compiling actix-codec v0.3.0
Compiling h2 v0.2.7
Compiling trust-dns-proto v0.19.7
Compiling actix-utils v2.0.0
Compiling trust-dns-resolver v0.19.7
Compiling actix-server v1.0.4
Compiling actix-tls v2.0.0
Compiling sycamore-reactive v0.6.3
Compiling actix-connect v2.0.0
Compiling actix-testing v1.0.1
Compiling sycamore v0.6.3
Compiling actix-http v2.2.1
Compiling sycamore-router v0.6.3
Compiling perseus v0.3.0-beta.14
Compiling awc v2.0.3
Compiling perseus-example-tiny v0.3.0-beta.14 (/app/tiny)
Compiling actix-web v3.3.2
Compiling perseus-engine v0.3.0-beta.13 (/app/tiny/.perseus)
error: could not compile `perseus-engine` due to 6 previous errors
warning: build failed, waiting for other jobs to finish...
error: build failed
[INFO]: Checking for the Wasm target...
[INFO]: Compiling to Wasm...
Blocking waiting for file lock on build directory
Compiling itoa v0.4.8
Compiling static_assertions v1.1.0
Compiling cfg-if v1.0.0
Compiling futures-sink v0.3.17
Compiling once_cell v1.8.0
Compiling hashbrown v0.11.2
Compiling utf8-width v0.1.5
Compiling pin-utils v0.1.0
Compiling futures-io v0.3.17
Compiling pin-project-lite v0.2.7
Compiling slab v0.4.5
Compiling smallvec v1.7.0
Compiling bytes v1.1.0
Compiling fnv v1.0.7
Compiling fmterr v0.1.1
Compiling urlencoding v2.1.0
Compiling fs_extra v1.2.0
Compiling lazy_static v1.4.0
Compiling ryu v1.0.5
Compiling serde v1.0.130
Compiling serde_json v1.0.68
Compiling memchr v2.4.1
Compiling lexical-util v0.8.1
Compiling wasm-bindgen v0.2.78
Compiling futures-core v0.3.17
Compiling futures-channel v0.3.17
Compiling proc-macro-nested v0.1.7
Compiling futures-task v0.3.17
Compiling libc v0.2.105
Compiling html-escape v0.2.9
Compiling http v0.2.5
Compiling indexmap v1.7.0
Compiling num-traits v0.2.14
Compiling futures-util v0.3.17
Compiling num-integer v0.1.44
Compiling ahash v0.7.6
Compiling lexical-write-integer v0.8.0
Compiling lexical-parse-integer v0.8.0
Compiling time v0.1.43
Compiling lexical-write-float v0.8.2
Compiling lexical-parse-float v0.8.2
Compiling lexical-core v0.8.2
Compiling chrono v0.4.19
Compiling thiserror v1.0.30
Compiling lexical v6.0.1
Compiling futures-executor v0.3.17
Compiling futures v0.3.17
Compiling js-sys v0.3.55
Compiling console_error_panic_hook v0.1.7
Compiling web-sys v0.3.55
Compiling wasm-bindgen-futures v0.4.28
Compiling sycamore-reactive v0.6.3
Compiling sycamore v0.6.3
Compiling sycamore-router v0.6.3
Compiling perseus v0.3.0-beta.14
Compiling perseus-example-tiny v0.3.0-beta.14 (/app/tiny)
Compiling perseus-engine v0.3.0-beta.13 (/app/tiny/.perseus)
error[E0432]: unresolved imports `perseus::Locales`, `perseus::TemplateMap`
--> src/app.rs:8:30
|
8 | ErrorPages, GenericNode, Locales, TemplateMap,
| ^^^^^^^ ^^^^^^^^^^^ no `TemplateMap` in the root
| |
| no `Locales` in the root
|
help: a similar name exists in the module
|
8 | ErrorPages, GenericNode, locales, TemplateMap,
| ^^^^^^^
help: a similar name exists in the module
|
8 | ErrorPages, GenericNode, Locales, Template,
| ^^^^^^^^
error[E0432]: unresolved imports `perseus::app_shell`, `perseus::detect_locale`, `perseus::ClientTranslationsManager`
--> src/lib.rs:8:15
|
8 | use perseus::{app_shell, create_app_route, detect_locale, ClientTranslationsManager, DomNode};
| ^^^^^^^^^ ^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^
| | | |
| | | no `ClientTranslationsManager` in the root
| | | help: a similar name exists in the module: `client_translations_manager`
| | no `detect_locale` in the root
| no `app_shell` in the root
error[E0603]: module `error_pages` is private
--> src/lib.rs:4:14
|
4 | use perseus::error_pages::ErrorPageData;
| ^^^^^^^^^^^ private module
|
note: the module `error_pages` is defined here
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/perseus-0.3.0-beta.14/src/lib.rs:48:1
|
48 | mod error_pages;
| ^^^^^^^^^^^^^^^^
error[E0603]: module `router` is private
--> src/lib.rs:6:14
|
6 | use perseus::router::{RouteInfo, RouteVerdict};
| ^^^^^^ private module
|
note: the module `router` is defined here
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/perseus-0.3.0-beta.14/src/lib.rs:56:1
|
56 | mod router;
| ^^^^^^^^^^^
error[E0603]: module `shell` is private
--> src/lib.rs:7:14
|
7 | use perseus::shell::{checkpoint, get_initial_state, get_render_cfg, InitialState};
| ^^^^^ private module
|
note: the module `shell` is defined here
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/perseus-0.3.0-beta.14/src/lib.rs:58:1
|
58 | mod shell;
| ^^^^^^^^^^
Some errors have detailed explanations: E0432, E0603.
For more information about an error, try `rustc --explain E0432`.
error: could not compile `perseus-engine` due to 5 previous errors
Error: Compiling your crate to WebAssembly failed
Caused by: failed to execute `cargo build`: exited with exit status: 101
full command: "cargo" "build" "--lib" "--release" "--target" "wasm32-unknown-unknown"
The command '/bin/sh -c perseus deploy' returned a non-zero code: 1 |
@phaleth could you try testing beta 13 with the code from the |
The It's odd that Dockerfile # get the base image
FROM rust:1.55-slim AS build
# install build dependencies
RUN apt update \
&& apt install -y --no-install-recommends lsb-release apt-transport-https \
build-essential curl
# vars
ENV PERSEUS_VERSION=0.3.0-beta.13 \
WEE_ALLOC_VERSION=0.4
# prepare root project dir
WORKDIR /app
# download the target for wasm
RUN rustup target add wasm32-unknown-unknown
# install wasm-pack
RUN cargo install wasm-pack
# retrieve the src dir
RUN curl https://codeload.github.com/arctic-hen7/perseus/tar.gz/v0.3.0-beta.13 | tar -xz --strip=2 perseus-0.3.0-beta.13/examples/tiny
# go to src dir
WORKDIR /app/tiny
# install perseus-cli
RUN cargo install perseus-cli --version $PERSEUS_VERSION
# clean app
RUN perseus clean
# specify deps in app config
RUN sed -i s"/perseus = .*/perseus = \"${PERSEUS_VERSION}\"/" ./Cargo.toml \
&& sed -i "/\[dependencies\]/a wee_alloc = \"${WEE_ALLOC_VERSION}\"" ./Cargo.toml \
&& cat ./Cargo.toml
# modify and prepend lib.rs
RUN sed -i s'/"Hello World!"/"世界您好 !"/' ./src/lib.rs \
&& echo '#[global_allocator] \n\
static ALLOC: wee_alloc::WeeAlloc = wee_alloc::WeeAlloc::INIT; \n\
' | cat - ./src/lib.rs > ./src/lib.rs.tmp \
&& mv ./src/lib.rs.tmp ./src/lib.rs \
&& cat ./src/lib.rs
# prep and eject app
RUN perseus prep && perseus eject
# adjust and append perseus config
RUN sed -i s"/perseus = .*/perseus = \"${PERSEUS_VERSION}\"/" .perseus/Cargo.toml \
&& echo ' \n\n\
[profile.release] \n\
codegen-units = 1 \n\
opt-level = "s" ' >> .perseus/Cargo.toml \
&& cat .perseus/Cargo.toml
# deploy app
RUN perseus deploy
# prepare deployment image
FROM bitnami/minideb:buster
WORKDIR /app
COPY --from=build /app/tiny/pkg /app/
ENV PERSEUS_STANDALONE=true
ENV HOST=0.0.0.0
CMD ["./server"] Docker build output ...
Step 7/21 : RUN curl https://codeload.github.com/arctic-hen7/perseus/tar.gz/v0.3.0-beta.13 | tar -xz --strip=2 perseus-0.3.0-beta.13/examples/tiny
---> Running in 995011b27a70
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 328k 100 328k 0 0 1046k 0 --:--:-- --:--:-- --:--:-- 1043k
Removing intermediate container 995011b27a70
---> 1a92dc4b61b8
Step 8/21 : WORKDIR /app/tiny
---> Running in 25ba93ae6088
Removing intermediate container 25ba93ae6088
---> 8354b2d88d1a
Step 9/21 : RUN cargo install perseus-cli --version $PERSEUS_VERSION
---> Running in e0daf51424af
Downloading crates ...
Downloaded perseus-cli v0.3.0-beta.13
Updating crates.io index
Installing perseus-cli v0.3.0-beta.13
Downloading crates ...
Downloaded strsim v0.10.0
Downloaded textwrap v0.14.2
Downloaded glob v0.3.0
Downloaded proc-macro-hack v0.5.19
Downloaded cargo_toml v0.9.2
Downloaded number_prefix v0.4.0
Downloaded anyhow v1.0.44
Downloaded indicatif v0.17.0-beta.1
Downloaded os_str_bytes v4.2.0
Downloaded clap_derive v3.0.0-beta.5
Downloaded fmterr v0.1.1
Downloaded include_dir_impl v0.6.2
Downloaded console v0.14.1
Downloaded fs_extra v1.2.0
Downloaded include_dir v0.6.2
Downloaded clap v3.0.0-beta.5
Compiling proc-macro2 v1.0.32
Compiling unicode-xid v0.2.2
Compiling syn v1.0.81
Compiling version_check v0.9.3
Compiling libc v0.2.106
Compiling serde v1.0.130
Compiling anyhow v1.0.44
Compiling memchr v2.4.1
Compiling proc-macro-hack v0.5.19
Compiling autocfg v1.0.1
Compiling serde_derive v1.0.130
Compiling unicode-segmentation v1.8.0
Compiling lazy_static v1.4.0
Compiling ryu v1.0.5
Compiling unicode-width v0.1.9
Compiling regex-syntax v0.6.25
Compiling once_cell v1.8.0
Compiling hashbrown v0.11.2
Compiling serde_json v1.0.68
Compiling itoa v0.4.8
Compiling bitflags v1.3.2
Compiling glob v0.3.0
Compiling strsim v0.10.0
Compiling termcolor v1.1.2
Compiling number_prefix v0.4.0
Compiling fs_extra v1.2.0
Compiling fmterr v0.1.1
Compiling proc-macro-error-attr v1.0.4
Compiling proc-macro-error v1.0.4
Compiling unicase v2.6.0
Compiling textwrap v0.14.2
Compiling indexmap v1.7.0
Compiling heck v0.3.3
Compiling regex v1.5.4
Compiling os_str_bytes v4.2.0
Compiling quote v1.0.10
Compiling terminal_size v0.1.17
Compiling atty v0.2.14
Compiling console v0.15.0
Compiling console v0.14.1
Compiling indicatif v0.17.0-beta.1
Compiling toml v0.5.8
Compiling clap_derive v3.0.0-beta.5
Compiling thiserror-impl v1.0.30
Compiling include_dir_impl v0.6.2
Compiling include_dir v0.6.2
Compiling thiserror v1.0.30
Compiling clap v3.0.0-beta.5
Compiling cargo_toml v0.9.2
Compiling perseus-cli v0.3.0-beta.13
Finished release [optimized] target(s) in 1m 03s
Installing /usr/local/cargo/bin/perseus
Installed package `perseus-cli v0.3.0-beta.13` (executable `perseus`)
Removing intermediate container e0daf51424af
---> ac652d5756a8
Step 10/21 : RUN perseus clean
---> Running in 3e05bdec3506
Removing intermediate container 3e05bdec3506
---> 9bd8826d0836
Step 11/21 : RUN sed -i s"/perseus = .*/perseus = \"${PERSEUS_VERSION}\"/" ./Cargo.toml && sed -i "/\[dependencies\]/a wee_alloc = \"${WEE_ALLOC_VERSION}\"" ./Cargo.toml && cat ./Cargo.toml
---> Running in 22600fb538fd
[package]
name = "perseus-example-tiny"
version = "0.3.0-beta.13"
edition = "2018"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
wee_alloc = "0.4"
perseus = "0.3.0-beta.13"
sycamore = "0.6"
Removing intermediate container 22600fb538fd
---> b5d507c6d708
Step 12/21 : RUN sed -i s'/"Hello World!"/"世界您好 !"/' ./src/lib.rs && echo '#[global_allocator] \nstatic ALLOC: wee_alloc::WeeAlloc = wee_alloc::WeeAlloc::INIT; \n' | cat - ./src/lib.rs > ./src/lib.rs.tmp && mv ./src/lib.rs.tmp ./src/lib.rs && cat ./src/lib.rs
---> Running in 0b5dd15ab15a
#[global_allocator]
static ALLOC: wee_alloc::WeeAlloc = wee_alloc::WeeAlloc::INIT;
use perseus::{define_app, ErrorPages, Template};
use sycamore::template;
define_app! {
templates: [
Template::<G>::new("index").template(|_| {
template! {
p { "世界您好 !" }
}
})
],
error_pages: ErrorPages::new(|url, status, err, _| {
template! {
p { (format!("An error with HTTP code {} occurred at '{}': '{}'.", status, url, err)) }
}
})
}
Removing intermediate container 0b5dd15ab15a
---> 95e6c5461fb5
Step 13/21 : RUN perseus prep && perseus eject
---> Running in b15866543bbc
Removing intermediate container b15866543bbc
---> 6256e5f2d0e8
Step 14/21 : RUN sed -i s"/perseus = .*/perseus = \"${PERSEUS_VERSION}\"/" .perseus/Cargo.toml && echo ' \n\n[profile.release] \ncodegen-units = 1 \nopt-level = "s" ' >> .perseus/Cargo.toml && cat .perseus/Cargo.toml
---> Running in fbc3dc78c581
# This crate defines the user's app in terms that Wasm can understand, making development significantly simpler.
# IMPORTANT: spacing matters in this file for runtime replacements, do NOT change it!
[package]
name = "perseus-engine"
version = "0.3.0-beta.13"
edition = "2018"
default-run = "perseus-builder"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
# We alias here because the package name will change based on whatever's in the user's manifest
app = { package = "perseus-example-tiny", path = "../" }
perseus = "0.3.0-beta.13"
sycamore = { version = "0.6", features = ["ssr"] }
sycamore-router = "0.6"
web-sys = { version = "0.3", features = ["Event", "Headers", "Request", "RequestInit", "RequestMode", "Response", "ReadableStream", "Window"] }
wasm-bindgen = { version = "0.2", features = ["serde-serialize"] }
wasm-bindgen-futures = "0.4"
serde = { version = "1", features = ["derive"] }
serde_json = "1" # Possibly don't need?
console_error_panic_hook = "0.1.6"
urlencoding = "2.1"
futures = "0.3"
fs_extra = "1"
lazy_static = "1"
# This section is needed for Wasm Pack (which we use instead of Trunk for flexibility)
[lib]
crate-type = ["cdylib", "rlib"]
# We define a binary for building, serving, and doing both
[[bin]]
name = "perseus-builder"
path = "src/bin/build.rs"
[[bin]]
name = "perseus-exporter"
path = "src/bin/export.rs"
[[bin]]
name = "perseus-tinker" # Yes, the noun is 'tinker', not 'tinkerer'
path = "src/bin/tinker.rs"
[workspace]
members = [ "server" ]
[profile.release]
codegen-units = 1
opt-level = "s"
Removing intermediate container fbc3dc78c581
---> cf4f5b9d200d
Step 15/21 : RUN perseus deploy
---> Running in ae4a39f9fde8
Blocking waiting for file lock on package cache
Updating crates.io index
Blocking waiting for file lock on package cache
Blocking waiting for file lock on package cache
Blocking waiting for file lock on package cache
Compiling proc-macro2 v1.0.32
Compiling unicode-xid v0.2.2
Compiling syn v1.0.81
Compiling autocfg v1.0.1
Compiling ryu v1.0.5
Compiling serde v1.0.130
Compiling serde_derive v1.0.130
Compiling serde_json v1.0.68
Compiling log v0.4.14
Compiling wasm-bindgen-shared v0.2.78
Compiling cfg-if v1.0.0
Compiling bumpalo v3.8.0
Compiling lazy_static v1.4.0
Compiling libc v0.2.106
Compiling version_check v0.9.3
Compiling itoa v0.4.8
Compiling memchr v2.4.1
Compiling static_assertions v1.1.0
Compiling wasm-bindgen v0.2.78
Compiling proc-macro-hack v0.5.19
Compiling futures-core v0.3.17
Compiling futures-channel v0.3.17
Compiling proc-macro-nested v0.1.7
Compiling futures-task v0.3.17
Compiling ident_case v1.0.1
Compiling hashbrown v0.11.2
Compiling strsim v0.10.0
Compiling once_cell v1.8.0
Compiling fnv v1.0.7
Compiling futures-sink v0.3.17
Compiling slab v0.4.5
Compiling futures-io v0.3.17
Compiling minimal-lexical v0.1.4
Compiling utf8-width v0.1.5
Compiling pin-utils v0.1.0
Compiling smallvec v1.7.0
Compiling pin-project-lite v0.2.7
Compiling async-trait v0.1.51
Compiling bytes v1.1.0
Compiling wee_alloc v0.4.5
Compiling urlencoding v2.1.0
Compiling fmterr v0.1.1
Compiling memory_units v0.4.0
Compiling cfg-if v0.1.10
Compiling fs_extra v1.2.0
Compiling indexmap v1.7.0
Compiling futures-macro v0.3.17
Compiling futures-util v0.3.17
Compiling num-traits v0.2.14
Compiling num-integer v0.1.44
Compiling lexical-util v0.8.1
Compiling ahash v0.7.6
Compiling nom v7.0.0
Compiling html-escape v0.2.9
Compiling http v0.2.5
Compiling lexical-parse-integer v0.8.0
Compiling lexical-write-integer v0.8.0
Compiling quote v1.0.10
Compiling lexical-parse-float v0.8.2
Compiling lexical-write-float v0.8.2
Compiling getrandom v0.2.3
Compiling time v0.1.43
Compiling lexical-core v0.8.2
Compiling lexical v6.0.1
Compiling chrono v0.4.19
Compiling wasm-bindgen-backend v0.2.78
Compiling darling_core v0.13.0
Compiling wasm-bindgen-macro-support v0.2.78
Compiling sycamore-macro v0.6.3
Compiling sycamore-router-macro v0.6.3
Compiling thiserror-impl v1.0.30
Compiling wasm-bindgen-macro v0.2.78
Compiling darling_macro v0.13.0
Compiling thiserror v1.0.30
Compiling darling v0.13.0
Compiling futures-executor v0.3.17
Compiling futures v0.3.17
Compiling perseus-macro v0.3.0-beta.15
Compiling js-sys v0.3.55
Compiling console_error_panic_hook v0.1.7
Compiling web-sys v0.3.55
Compiling wasm-bindgen-futures v0.4.28
Compiling sycamore-reactive v0.6.3
Compiling sycamore v0.6.3
Compiling sycamore-router v0.6.3
Compiling perseus v0.3.0-beta.15
Compiling perseus-example-tiny v0.3.0-beta.13 (/app/tiny)
Compiling perseus-engine v0.3.0-beta.13 (/app/tiny/.perseus)
error[E0432]: unresolved imports `perseus::Locales`, `perseus::TemplateMap`
--> src/app.rs:8:30
|
8 | ErrorPages, GenericNode, Locales, TemplateMap,
| ^^^^^^^ ^^^^^^^^^^^ no `TemplateMap` in the root
| |
| no `Locales` in the root
|
help: a similar name exists in the module
|
8 | ErrorPages, GenericNode, locales, TemplateMap,
| ^^^^^^^
help: a similar name exists in the module
|
8 | ErrorPages, GenericNode, Locales, Template,
| ^^^^^^^^
error[E0432]: unresolved imports `perseus::app_shell`, `perseus::detect_locale`, `perseus::ClientTranslationsManager`
--> src/lib.rs:8:15
|
8 | use perseus::{app_shell, create_app_route, detect_locale, ClientTranslationsManager, DomNode};
| ^^^^^^^^^ ^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^
| | | |
| | | no `ClientTranslationsManager` in the root
| | | help: a similar name exists in the module: `client_translations_manager`
| | no `detect_locale` in the root
| no `app_shell` in the root
error[E0603]: module `error_pages` is private
--> src/lib.rs:4:14
|
4 | use perseus::error_pages::ErrorPageData;
| ^^^^^^^^^^^ private module
|
note: the module `error_pages` is defined here
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/perseus-0.3.0-beta.15/src/lib.rs:48:1
|
48 | mod error_pages;
| ^^^^^^^^^^^^^^^^
error[E0603]: module `router` is private
--> src/lib.rs:6:14
|
6 | use perseus::router::{RouteInfo, RouteVerdict};
| ^^^^^^ private module
|
note: the module `router` is defined here
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/perseus-0.3.0-beta.15/src/lib.rs:56:1
|
56 | mod router;
| ^^^^^^^^^^^
error[E0603]: module `shell` is private
--> src/lib.rs:7:14
|
7 | use perseus::shell::{checkpoint, get_initial_state, get_render_cfg, InitialState};
| ^^^^^ private module
|
note: the module `shell` is defined here
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/perseus-0.3.0-beta.15/src/lib.rs:58:1
|
58 | mod shell;
| ^^^^^^^^^^
Some errors have detailed explanations: E0432, E0603.
For more information about an error, try `rustc --explain E0432`.
error: could not compile `perseus-engine` due to 5 previous errors
[INFO]: Checking for the Wasm target...
[INFO]: Compiling to Wasm...
Blocking waiting for file lock on build directory
Compiling itoa v0.4.8
Compiling static_assertions v1.1.0
Compiling cfg-if v1.0.0
Compiling hashbrown v0.11.2
Compiling futures-sink v0.3.17
Compiling once_cell v1.8.0
Compiling pin-project-lite v0.2.7
Compiling pin-utils v0.1.0
Compiling utf8-width v0.1.5
Compiling futures-io v0.3.17
Compiling slab v0.4.5
Compiling smallvec v1.7.0
Compiling bytes v1.1.0
Compiling fnv v1.0.7
Compiling urlencoding v2.1.0
Compiling fmterr v0.1.1
Compiling memory_units v0.4.0
Compiling cfg-if v0.1.10
Compiling lazy_static v1.4.0
Compiling fs_extra v1.2.0
Compiling ryu v1.0.5
Compiling serde v1.0.130
Compiling serde_json v1.0.68
Compiling memchr v2.4.1
Compiling wasm-bindgen v0.2.78
Compiling futures-core v0.3.17
Compiling futures-channel v0.3.17
Compiling futures-task v0.3.17
Compiling proc-macro-nested v0.1.7
Compiling libc v0.2.106
Compiling lexical-util v0.8.1
Compiling wee_alloc v0.4.5
Compiling html-escape v0.2.9
Compiling indexmap v1.7.0
Compiling num-traits v0.2.14
Compiling futures-util v0.3.17
Compiling num-integer v0.1.44
Compiling ahash v0.7.6
Compiling http v0.2.5
Compiling lexical-write-integer v0.8.0
Compiling lexical-parse-integer v0.8.0
Compiling time v0.1.43
Compiling thiserror v1.0.30
Compiling lexical-write-float v0.8.2
Compiling lexical-parse-float v0.8.2
Compiling lexical-core v0.8.2
Compiling chrono v0.4.19
Compiling lexical v6.0.1
Compiling futures-executor v0.3.17
Compiling futures v0.3.17
Compiling js-sys v0.3.55
Compiling console_error_panic_hook v0.1.7
Compiling web-sys v0.3.55
Compiling wasm-bindgen-futures v0.4.28
Compiling sycamore-reactive v0.6.3
Compiling sycamore v0.6.3
Compiling sycamore-router v0.6.3
Compiling perseus v0.3.0-beta.15
Compiling perseus-example-tiny v0.3.0-beta.13 (/app/tiny)
Compiling perseus-engine v0.3.0-beta.13 (/app/tiny/.perseus)
error[E0432]: unresolved imports `perseus::Locales`, `perseus::TemplateMap`
--> src/app.rs:8:30
|
8 | ErrorPages, GenericNode, Locales, TemplateMap,
| ^^^^^^^ ^^^^^^^^^^^ no `TemplateMap` in the root
| |
| no `Locales` in the root
|
help: a similar name exists in the module
|
8 | ErrorPages, GenericNode, locales, TemplateMap,
| ^^^^^^^
help: a similar name exists in the module
|
8 | ErrorPages, GenericNode, Locales, Template,
| ^^^^^^^^
error[E0432]: unresolved imports `perseus::app_shell`, `perseus::detect_locale`, `perseus::ClientTranslationsManager`
--> src/lib.rs:8:15
|
8 | use perseus::{app_shell, create_app_route, detect_locale, ClientTranslationsManager, DomNode};
| ^^^^^^^^^ ^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^
| | | |
| | | no `ClientTranslationsManager` in the root
| | | help: a similar name exists in the module: `client_translations_manager`
| | no `detect_locale` in the root
| no `app_shell` in the root
error[E0603]: module `error_pages` is private
--> src/lib.rs:4:14
|
4 | use perseus::error_pages::ErrorPageData;
| ^^^^^^^^^^^ private module
|
note: the module `error_pages` is defined here
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/perseus-0.3.0-beta.15/src/lib.rs:48:1
|
48 | mod error_pages;
| ^^^^^^^^^^^^^^^^
error[E0603]: module `router` is private
--> src/lib.rs:6:14
|
6 | use perseus::router::{RouteInfo, RouteVerdict};
| ^^^^^^ private module
|
note: the module `router` is defined here
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/perseus-0.3.0-beta.15/src/lib.rs:56:1
|
56 | mod router;
| ^^^^^^^^^^^
error[E0603]: module `shell` is private
--> src/lib.rs:7:14
|
7 | use perseus::shell::{checkpoint, get_initial_state, get_render_cfg, InitialState};
| ^^^^^ private module
|
note: the module `shell` is defined here
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/perseus-0.3.0-beta.15/src/lib.rs:58:1
|
58 | mod shell;
| ^^^^^^^^^^
Some errors have detailed explanations: E0432, E0603.
For more information about an error, try `rustc --explain E0432`.
error: could not compile `perseus-engine` due to 5 previous errors
Error: Compiling your crate to WebAssembly failed
Caused by: failed to execute `cargo build`: exited with exit status: 101
full command: "cargo" "build" "--lib" "--release" "--target" "wasm32-unknown-unknown"
The command '/bin/sh -c perseus deploy' returned a non-zero code: 1 |
There were changes to the engine and the |
The error has changed a bit. Instead of Dockerfile # get the base image
FROM rust:1.55-slim AS build
# install build dependencies
RUN apt update \
&& apt install -y --no-install-recommends lsb-release apt-transport-https \
build-essential curl
# vars
ENV PERSEUS_VERSION=0.3.0-beta.16 \
WEE_ALLOC_VERSION=0.4
# prepare root project dir
WORKDIR /app
# download the target for wasm
RUN rustup target add wasm32-unknown-unknown
# install wasm-pack
RUN cargo install wasm-pack
# retrieve the src dir
RUN curl https://codeload.github.com/arctic-hen7/perseus/tar.gz/v${PERSEUS_VERSION} | tar -xz --strip=2 perseus-${PERSEUS_VERSION}/examples/tiny
# go to src dir
WORKDIR /app/tiny
# install perseus-cli
RUN cargo install perseus-cli --version $PERSEUS_VERSION
# clean app
RUN perseus clean
# specify deps in app config
RUN sed -i s"/perseus = .*/perseus = \"${PERSEUS_VERSION}\"/" ./Cargo.toml \
&& sed -i "/\[dependencies\]/a wee_alloc = \"${WEE_ALLOC_VERSION}\"" ./Cargo.toml \
&& cat ./Cargo.toml
# modify and prepend lib.rs
RUN sed -i s'/"Hello World!"/"世界您好 !"/' ./src/lib.rs \
&& echo '#[global_allocator] \n\
static ALLOC: wee_alloc::WeeAlloc = wee_alloc::WeeAlloc::INIT; \n\
' | cat - ./src/lib.rs > ./src/lib.rs.tmp \
&& mv ./src/lib.rs.tmp ./src/lib.rs \
&& cat ./src/lib.rs
# prep and eject app
RUN perseus prep && perseus eject
# adjust and append perseus config
RUN sed -i s"/perseus = .*/perseus = \"${PERSEUS_VERSION}\"/" .perseus/Cargo.toml \
&& echo ' \n\n\
[profile.release] \n\
codegen-units = 1 \n\
opt-level = "s" ' >> .perseus/Cargo.toml \
&& cat .perseus/Cargo.toml
# deploy app
RUN perseus deploy
# prepare deployment image
FROM bitnami/minideb:buster
WORKDIR /app
COPY --from=build /app/tiny/pkg /app/
ENV PERSEUS_STANDALONE=true
ENV HOST=0.0.0.0
CMD ["./server"] Docker build output ...
Step 7/21 : RUN curl https://codeload.github.com/arctic-hen7/perseus/tar.gz/v${PERSEUS_VERSION} | tar -xz --strip=2 perseus-${PERSEUS_VERSION}/examples/tiny
---> Running in ee558711a0ad
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 338k 0 338k 0 0 929k 0 --:--:-- --:--:-- --:--:-- 927k
Removing intermediate container ee558711a0ad
---> 612f4bca26e0
Step 8/21 : WORKDIR /app/tiny
---> Running in 7397c96c1ee1
Removing intermediate container 7397c96c1ee1
---> c83c94edf373
Step 9/21 : RUN cargo install perseus-cli --version $PERSEUS_VERSION
---> Running in 4ccd22216adf
Downloading crates ...
Downloaded perseus-cli v0.3.0-beta.16
Updating crates.io index
Installing perseus-cli v0.3.0-beta.16
Downloading crates ...
Downloaded indicatif v0.17.0-beta.1
Downloaded number_prefix v0.4.0
Downloaded proc-macro-hack v0.5.19
Downloaded os_str_bytes v4.2.0
Downloaded clap v3.0.0-beta.5
Downloaded fmterr v0.1.1
Downloaded console v0.14.1
Downloaded cargo_toml v0.9.2
Downloaded textwrap v0.14.2
Downloaded include_dir v0.6.2
Downloaded anyhow v1.0.45
Downloaded strsim v0.10.0
Downloaded include_dir_impl v0.6.2
Downloaded glob v0.3.0
Downloaded clap_derive v3.0.0-beta.5
Downloaded fs_extra v1.2.0
Compiling proc-macro2 v1.0.32
Compiling unicode-xid v0.2.2
Compiling syn v1.0.81
Compiling version_check v0.9.3
Compiling libc v0.2.106
Compiling serde v1.0.130
Compiling anyhow v1.0.45
Compiling memchr v2.4.1
Compiling autocfg v1.0.1
Compiling proc-macro-hack v0.5.19
Compiling unicode-width v0.1.9
Compiling ryu v1.0.5
Compiling unicode-segmentation v1.8.0
Compiling lazy_static v1.4.0
Compiling regex-syntax v0.6.25
Compiling serde_derive v1.0.130
Compiling hashbrown v0.11.2
Compiling serde_json v1.0.69
Compiling once_cell v1.8.0
Compiling termcolor v1.1.2
Compiling number_prefix v0.4.0
Compiling itoa v0.4.8
Compiling strsim v0.10.0
Compiling bitflags v1.3.2
Compiling glob v0.3.0
Compiling fmterr v0.1.1
Compiling fs_extra v1.2.0
Compiling proc-macro-error-attr v1.0.4
Compiling proc-macro-error v1.0.4
Compiling unicase v2.6.0
Compiling textwrap v0.14.2
Compiling indexmap v1.7.0
Compiling heck v0.3.3
Compiling regex v1.5.4
Compiling os_str_bytes v4.2.0
Compiling quote v1.0.10
Compiling terminal_size v0.1.17
Compiling atty v0.2.14
Compiling console v0.15.0
Compiling console v0.14.1
Compiling indicatif v0.17.0-beta.1
Compiling toml v0.5.8
Compiling include_dir_impl v0.6.2
Compiling clap_derive v3.0.0-beta.5
Compiling thiserror-impl v1.0.30
Compiling include_dir v0.6.2
Compiling thiserror v1.0.30
Compiling clap v3.0.0-beta.5
Compiling cargo_toml v0.9.2
Compiling perseus-cli v0.3.0-beta.16
Finished release [optimized] target(s) in 1m 02s
Installing /usr/local/cargo/bin/perseus
Installed package `perseus-cli v0.3.0-beta.16` (executable `perseus`)
Removing intermediate container 4ccd22216adf
---> e7fac4648ec7
Step 10/21 : RUN perseus clean
---> Running in c22f9cba4853
Removing intermediate container c22f9cba4853
---> e790258c98d4
Step 11/21 : RUN sed -i s"/perseus = .*/perseus = \"${PERSEUS_VERSION}\"/" ./Cargo.toml && sed -i "/\[dependencies\]/a wee_alloc = \"${WEE_ALLOC_VERSION}\"" ./Cargo.toml && cat ./Cargo.toml
---> Running in 6b33973105ee
[package]
name = "perseus-example-tiny"
version = "0.3.0-beta.16"
edition = "2018"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
wee_alloc = "0.4"
perseus = "0.3.0-beta.16"
sycamore = "0.6"
Removing intermediate container 6b33973105ee
---> 17e0a58e788d
Step 12/21 : RUN sed -i s'/"Hello World!"/"世界您好 !"/' ./src/lib.rs && echo '#[global_allocator] \nstatic ALLOC: wee_alloc::WeeAlloc = wee_alloc::WeeAlloc::INIT; \n' | cat - ./src/lib.rs > ./src/lib.rs.tmp && mv ./src/lib.rs.tmp ./src/lib.rs && cat ./src/lib.rs
---> Running in 529b2ffaf7c9
#[global_allocator]
static ALLOC: wee_alloc::WeeAlloc = wee_alloc::WeeAlloc::INIT;
use perseus::{define_app, ErrorPages, Template};
use sycamore::template;
define_app! {
templates: [
Template::<G>::new("index").template(|_| {
template! {
p { "世界您好 !" }
}
})
],
error_pages: ErrorPages::new(|url, status, err, _| {
template! {
p { (format!("An error with HTTP code {} occurred at '{}': '{}'.", status, url, err)) }
}
})
}
Removing intermediate container 529b2ffaf7c9
---> 744577a660be
Step 13/21 : RUN perseus prep && perseus eject
---> Running in 01438a80d5a5
Removing intermediate container 01438a80d5a5
---> 15f2ed151e09
Step 14/21 : RUN sed -i s"/perseus = .*/perseus = \"${PERSEUS_VERSION}\"/" .perseus/Cargo.toml && echo ' \n\n[profile.release] \ncodegen-units = 1 \nopt-level = "s" ' >> .perseus/Cargo.toml && cat .perseus/Cargo.toml
---> Running in 38f80be4fbe8
# This crate defines the user's app in terms that Wasm can understand, making development significantly simpler.
# IMPORTANT: spacing matters in this file for runtime replacements, do NOT change it!
[package]
name = "perseus-engine"
version = "0.3.0-beta.16"
edition = "2018"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
# We alias here because the package name will change based on whatever's in the user's manifest
app = { package = "perseus-example-tiny", path = "../" }
perseus = "0.3.0-beta.16"
sycamore = { version = "0.6", features = ["ssr"] }
sycamore-router = "0.6"
web-sys = { version = "0.3", features = ["Event", "Headers", "Request", "RequestInit", "RequestMode", "Response", "ReadableStream", "Window"] }
wasm-bindgen = "0.2"
wasm-bindgen-futures = "0.4"
console_error_panic_hook = "0.1.6"
# This section is needed for Wasm Pack (which we use instead of Trunk for flexibility)
[lib]
crate-type = ["cdylib", "rlib"]
[workspace]
[profile.release]
codegen-units = 1
opt-level = "s"
Removing intermediate container 38f80be4fbe8
---> 04d041f58bdb
Step 15/21 : RUN perseus deploy
---> Running in 203d6d23e888
Error: couldn't remove and replace internal build artifact directory 'Some("/app/tiny/.perseus/dist/static")' (run `perseus clean` if this persists)
Caused by:
No such file or directory (os error 2)
The command '/bin/sh -c perseus deploy' returned a non-zero code: 1 |
Okay, I can replicate this in Docker. I'm trying now without Docker to see if I can diagnose this further... |
This *should* fix #69, but we'll see.
This actually looks like a Docker problem, because I can get everything to work perfectly outside it. The error we're getting in Docker is caused by the I think my next step in trying to fix this will be to replace the |
Hmm, thanks for looking into that. I guess the I'm really glad this is not a debian host related issue. ...
Step 15/22 : RUN ls -la .perseus/
---> Running in 77b687db663f
total 36
drwxr-xr-x 1 root root 4096 Nov 6 06:43 .
drwxrwxr-x 1 root root 4096 Nov 6 06:43 ..
-rw-r--r-- 1 root root 67 Nov 6 06:43 .ejected
-rw-r--r-- 1 root root 14 Nov 6 06:43 .gitignore
-rw-r--r-- 1 root root 1071 Nov 6 06:43 Cargo.toml
-rw-r--r-- 1 root root 1025 Nov 6 06:43 Cargo.toml.old
drwxr-xr-x 3 root root 4096 Nov 6 06:43 builder
drwxr-xr-x 3 root root 4096 Nov 6 06:43 server
drwxr-xr-x 2 root root 4096 Nov 6 06:43 src
Removing intermediate container 77b687db663f
---> fa805f1425f8
Step 16/22 : RUN perseus deploy
---> Running in 539569802f2d
Error: couldn't remove and replace internal build artifact directory 'Some("/app/tiny/.perseus/dist/static")' (run `perseus clean` if this persists)
Caused by:
No such file or directory (os error 2) |
Okay! It took me a few segmentation faults and version incompatibilities, but I have this working with a minimal FROM rust:1.55-slim AS build
RUN apt update \
&& apt install -y --no-install-recommends lsb-release apt-transport-https \
build-essential curl
ENV PERSEUS_VERSION=fix-69
ENV PERSEUS_URL=https://github.com/arctic-hen7/perseus
WORKDIR /app
RUN rustup target add wasm32-unknown-unknown
RUN cargo install wasm-pack
RUN curl https://codeload.github.com/arctic-hen7/perseus/tar.gz/${PERSEUS_VERSION} | tar -xz --strip=2 perseus-${PERSEUS_VERSION}/examples/tiny
WORKDIR /app/tiny
RUN cargo install perseus-cli --git https://github.com/arctic-hen7/perseus --branch fix-69
RUN sed -i s"/perseus = .*/perseus = { git = \"https:\/\/github.com\/arctic-hen7\/perseus\", branch = \"fix-69\" }/" ./Cargo.toml
RUN perseus prep
RUN sed -i s"/perseus = .*/perseus = { git = \"https:\/\/github.com\/arctic-hen7\/perseus\", branch = \"fix-69\" }/" ./.perseus/Cargo.toml
RUN sed -i s"/{ version = \".*16\"/{ git = \"https:\/\/github.com\/arctic-hen7\/perseus\", branch = \"fix-69\"/" ./.perseus/server/Cargo.toml
RUN sed -i s"/perseus-actix-web = .*/perseus-actix-web = { git = \"https:\/\/github.com\/arctic-hen7\/perseus\", branch = \"fix-69\" }/" ./.perseus/server/Cargo.toml
RUN sed -i s"/{ version = \".*16\"/{ git = \"https:\/\/github.com\/arctic-hen7\/perseus\", branch = \"fix-69\"/" ./.perseus/builder/Cargo.toml
RUN perseus deploy
FROM bitnami/minideb:buster
WORKDIR /app
COPY --from=build /app/tiny/pkg /app/
ENV PERSEUS_STANDALONE=true
ENV HOST=0.0.0.0
CMD ["./server"] I'll release beta 17 with this fix imminently. |
Okay, I've released beta 17, and this FROM rust:1.55-slim AS build
RUN apt update \
&& apt install -y --no-install-recommends lsb-release apt-transport-https \
build-essential curl
ENV PERSEUS_VERSION=0.3.0-beta.17
WORKDIR /app
RUN rustup target add wasm32-unknown-unknown
RUN cargo install wasm-pack
RUN curl https://codeload.github.com/arctic-hen7/perseus/tar.gz/v${PERSEUS_VERSION} | tar -xz --strip=2 perseus-${PERSEUS_VERSION}/examples/tiny
WORKDIR /app/tiny
RUN cargo install perseus-cli --version ${PERSEUS_VERSION}
RUN sed -i s"/perseus = .*/perseus = \"${PERSEUS_VERSION}\"/" ./Cargo.toml
RUN perseus deploy
FROM bitnami/minideb:buster
WORKDIR /app
COPY --from=build /app/tiny/pkg /app/
ENV PERSEUS_STANDALONE=true
ENV HOST=0.0.0.0
CMD ["./server"] @phaleth, now that I've eliminated that error, could you please confirm that the original error about cross-device links isn't coming back for you (I can't replicate that on my local system or in Docker)? |
@arctic-hen7, setting up the Bellow is a Dockerfile # get the base image
FROM rust:1.55-slim AS build
# install build dependencies
RUN apt update \
&& apt install -y --no-install-recommends lsb-release apt-transport-https \
build-essential curl
# vars
ENV PERSEUS_VERSION=0.3.0-beta.17 \
PERSEUS_SIZE_OPT_VERSION=0.1.2
# prepare root project dir
WORKDIR /app
# download the target for wasm
RUN rustup target add wasm32-unknown-unknown
# install wasm-pack
RUN cargo install wasm-pack
# retrieve the src dir
RUN curl https://codeload.github.com/arctic-hen7/perseus-size-opt/tar.gz/main | tar -xz --strip=2 perseus-size-opt-main/examples/simple
# go to src dir
WORKDIR /app/simple
# install perseus-cli
RUN cargo install perseus-cli --version $PERSEUS_VERSION
# clean and prep app
RUN perseus clean && perseus prep
# specify deps in app config
RUN sed -i s"/perseus = .*/perseus = \"${PERSEUS_VERSION}\"/" ./Cargo.toml \
&& sed -i s"/perseus-size-opt = .*/perseus-size-opt = \"${PERSEUS_SIZE_OPT_VERSION}\"/" ./Cargo.toml \
&& cat ./Cargo.toml
# modify lib.rs
RUN sed -i s'/SizeOpts::default()/SizeOpts { wee_alloc: true, lto: false, opt_level: "s".to_string(), codegen_units: 1, }/' ./src/lib.rs \
&& sed -i s'/"Hello World!"/"世界您好 !"/' ./src/lib.rs \
&& cat ./src/lib.rs
# run plugin(s) to adjust app
RUN perseus tinker \
&& cat .perseus/Cargo.toml \
&& cat ./src/lib.rs
# single-threaded perseus CLI mode
ENV PERSEUS_CLI_SEQUENTIAL=true
# deploy app
RUN perseus deploy
# prepare deployment image
FROM bitnami/minideb:buster
WORKDIR /app
COPY --from=build /app/simple/pkg /app/
ENV PERSEUS_STANDALONE=true
ENV HOST=0.0.0.0
CMD ["./server"] user@debian-cpx11:~/perseus_example$ docker exec -it perseus_example_perseus_1 ls -lha
total 12M
drwxr-xr-x 1 root root 4.0K Nov 7 10:25 .
drwxr-xr-x 1 root root 4.0K Nov 7 10:25 ..
drwxr-xr-x 5 root root 4.0K Nov 7 10:25 dist
-rw-rw-r-- 1 root root 281 Nov 7 10:25 index.html
-rwxr-xr-x 1 root root 12M Nov 7 10:25 server |
Fantastic! Yeah, the optimisations I've introduced over the last few beta versions have separated the client and server bundles completely, so optimisations for the two are now independent. I also eliminated some server side code leakage from the client bundle, so I'm glad that's all working now! |
Describe the bug
Ever since
0.3.0-beta.14
is outperseus deploy
consistently fails with two different errors on two different machines, locally and on a VPS. Right now, in the same way as described bellow, it's also impossible to deploy previous version0.3.0-beta.13
, which worked before the0.3.0-beta.14
release. TheDockerfile
bellow is standalone and does attempt to deploy thetiny
example of this repo.To Reproduce
Dockerfile
Part of docker build output from local machine
Part of docker build output from VPS
Expected behavior
perseus deploy
to perform successfully at least for the version0.3.0-beta.14
.Screenshots
None.
Environment (please complete the following information):
Additional context
The
Dockerfile
above isn't using theperseus-size-opt
plugin, but instead addswee_alloc
optimizations manually.The text was updated successfully, but these errors were encountered: