眠気.jl

投稿=不定期

Rust

Yewで作ったアプリをAmplifyにデプロイした:備忘録

前回 www.mathwithjulia.com 作ったYewのアプリをAmplifyでホスティングできたのでamplify.ymlを公開しておきます version: 1 frontend: phases: preBuild: commands: - curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y - source …

YewでMaterialUIが使えるらしいmaterial-yew使ってみた:備忘録(Rust)

Yewプロジェクトの準備 cargo newで作る方法 Tutorial | Yew と、cargo new --libで作る方法 Getting Started | Yew がありますが、今回はcargo newで準備します cargo install trunk rustup target add wasm32-unknown-unknown cargo new yew mui Cargo.tom…

YewでJSONをHTML表示: チュートリアルの備忘録

struct Video { id: usize, title: String, speaker: String, url: String, } let videos = vec![ Video { id: 1, title: "Building and breaking things".to_string(), speaker: "John Doe".to_string(), url: "https://youtu.be/PsaFVLr8t4E".to_string(),…

日記

1 今日 焼肉行った、美味しかった。おごったので明日から雑草食べて暮らします。 2 畳と女と食洗機 ばじるさんとおそろいの食洗機買っちゃいました、すごいですか? 今までの食洗機大体1年で動作不良起こしていたので、今回は5年保証に加入して箱も保存しま…

RustでWebする時使うやつ備忘録

http handler, axum axum - Rust frontend, yew Getting Started | Yew ORM, diesel Getting Started

Rustでバイナリクレート✕1, ライブラリクレート✕Nのワークスペース作成

mkdir workspace cargo new binarycrate --bin cargo new libs1 --lib cargo new libs2 --lib workspace/Cargo.tomlを作成して [workspace] members = [ "args", "libs1", "libs2", ] これがいいのかわかってないのでコメントお待ちしております

hyper-tlsでHTTPSリクエスト(not HTTP)する備忘録

経緯 DMM APIがHTTPSリクエストしか許してくれず、かと言ってhyperでhttpsリクエストしようとすると StringError("Invalid scheme for Http") なのでhyper-tlsいれてリクエスト飛ばして解決しました 手順 Cargo.toml追記 hyper = { version = "0.14.23", fea…

YewでHelloWorld: 備忘録

Yew動かすまでにやったことすべてのメモ cargo new yewexample cd yewexample touch index.html cargo install --locked trunk Cargo.toml追記 yew = { git = "https://github.com/yewstack/yew/", features = ["csr"]} src/main.rsの編集 use yew::prelude:…

AWS App Runnerでactixをホスティングする手順

準備 aws configure 通したaws cli examples/docker at master · actix/examples · GitHub をクローンして、examples/dockerの中で作業する 目標 App Runnerのデフォルトドメインを叩いて、ローカルと同じ挙動にする curl [デフォルトドメイン]; curl [デフ…