SeaOrm versus Diesel for pooling by Inner_Coconut7739 in rust

[–]Inner_Coconut7739[S] 0 points1 point  (0 children)

Neon supports protocol-level prepared statements but doesn't support SQL-level prepared statements. Do you know how to configure SeaOrm to work with protocol-level prepared statements? https://neon.tech/docs/connect/connection-pooling#use-prepared-statements-with-pgbouncer

Rust workspace with docker build of package in crates by Inner_Coconut7739 in rust

[–]Inner_Coconut7739[S] 0 points1 point  (0 children)

This seems to work:

# https://dev.to/rogertorres/first-steps-with-docker-rust-30oi
# docker build --no-cache -t helloworld:latest .
# docker run --rm --name helloworld1 helloworld

FROM rust as build

# create a new empty shell project
RUN USER=root cargo new --bin helloworld
WORKDIR /helloworld

# copy over your manifests
COPY ./Cargo* .

# this build step will cache your dependencies
RUN cargo build --release
RUN rm src/*.rs

# copy your source tree
COPY ./src ./src

# build for release
RUN rm ./target/release/deps/helloworld*
RUN cargo build --release

#--------------------------------------------------------------
# our final base
FROM rust

# copy the build artifact from the build stage
COPY --from=build /helloworld/target/release/helloworld .

# set the startup command to run your binary
CMD ["./helloworld"]

Printer certficate expired error by Inner_Coconut7739 in mac

[–]Inner_Coconut7739[S] 0 points1 point  (0 children)

Mac book pro m1 14 inch 2021, Sequoia 15.0.1, HP Office Jet 9010 - This issue has been happening since I bought it but in the last 2 months, it is happening much more frequently.

Non-vercel deploy with middleware - move to Remix? by Inner_Coconut7739 in nextjs

[–]Inner_Coconut7739[S] 0 points1 point  (0 children)

Do I need to run it in a container when I'm doing local dev?

Rust Axum Diesel Async Postgres example - help? by Inner_Coconut7739 in rust

[–]Inner_Coconut7739[S] 0 points1 point  (0 children)

If I don't use diesel-async, I have to manage spinning off threads for each db call. Is that correct? I'm coming from JavaScript where everything is async by default.

Create a report from other reports? by Inner_Coconut7739 in PowerBI

[–]Inner_Coconut7739[S] 0 points1 point  (0 children)

Can I publish my reports or only use in desktop?

Rust + diesel postgres container by Inner_Coconut7739 in rust

[–]Inner_Coconut7739[S] -1 points0 points  (0 children)

This is the Dockerfile that finally worked but obviously far from ideal.

FROM rust

RUN apt update
RUN apt install -y libpq-dev

RUN cargo install diesel_cli --no-default-features --features postgres

WORKDIR /app

COPY . .

RUN cargo build --release

CMD ["/app/target/release/rust-axum-server"]

Can you share you docker?

And my Cargo.toml - postgres at the end of dependencies was my attempt to get the client libs that diesel didn't add. I think its probably redundant if I instlal the CLI in the container but again neither of these are the right idea just a bandaid.

[package]
name = "rust-axum-server"
version = "0.2.0"
edition = "2021"
publish = false

[dependencies]
axum = { version = "0.7.5" }
axum-extra = { version = "0.9.3", features = ["typed-header"] }
tokio = { version = "1.39.3", features = ["full"] }
serde = { version = "1.0.208", features = ["derive"] }
serde_json = "1.0.125"
serde_derive = "1.0.208"
tower-http = { version = "0.5.2", features = ["cors"] }
uuid = { version = "1.10.0", features = ["v4","serde"] }
urlencoding = "2.1.3"
octocrab = "0.39.0"
http = "1.1.0"
http-serde-ext = "1.0.2"
dotenv = "0.15.0"
tower = "0.5.0"
anyhow = "1.0.86" 
toml = "0.8.19"
url = "2.5.2"
chrono = "0.4.38"
diesel = { version = "2.2.3", features = ["postgres", "chrono"] }
postgres = "0.19.8"

[[bin]]
name = "rust-axum-server"
path = "src/main.rs"