From 21d6bf97870c3c1f891ef1fd297be69398163aa4 Mon Sep 17 00:00:00 2001 From: Xavier Brinon Date: Tue, 21 Nov 2023 07:09:24 +0000 Subject: [PATCH] confirm all requs are met before starting --- .gitignore | 2 ++ README.md | 3 --- README.org | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 60 insertions(+), 3 deletions(-) delete mode 100644 README.md create mode 100644 README.org diff --git a/.gitignore b/.gitignore index 3ca43ae..60828fd 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,5 @@ Cargo.lock # MSVC Windows builds of rustc generate these, which store debugging information *.pdb +# Emacs ignore autosaved +*~ \ No newline at end of file diff --git a/README.md b/README.md deleted file mode 100644 index edecc92..0000000 --- a/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# spin-rust-components - -Going through https://developer.fermyon.com/spin/v2/rust-components \ No newline at end of file diff --git a/README.org b/README.org new file mode 100644 index 0000000..850e2c4 --- /dev/null +++ b/README.org @@ -0,0 +1,58 @@ +#+title: Building Spin components in Rust +#+date:[2023-11-21 Tue] +#+author: HaQadosch +#+startup: indent +#+note: based on https://developer.fermyon.com/spin/v2/rust-components +* Org shortcuts +** Footnotes +- create footnote :: ~C-c C-x f~ +- jump to the footnote ref :: ~C-c C-c~ +* Prerequisites +Make sure you have all the *templates* +#+name: check templates +#+begin_src shell + spin templates install --git https://github.com/fermyon/spin --update +#+end_src + +#+RESULTS: check templates +: Copying remote template source +: Installing template http-zig... +: Installing template redis-rust... +: Installing template http-empty... +: Installing template redis-go... +: Installing template http-rust... +: Installing template http-grain... +: Installing template http-c... +: Installing template http-go... +: Installing template http-php... +: Installing template static-fileserver... +: Installing template http-swift... +: Installing template redirect... +: Installed 12 template(s) +: +: +------------------------------------------------------------------------+ +: | Name Description | +: +========================================================================+ +: | http-c HTTP request handler using C and the Zig toolchain | +: | http-empty HTTP application with no components | +: | http-go HTTP request handler using (Tiny)Go | +: | http-grain HTTP request handler using Grain | +: | http-php HTTP request handler using PHP | +: | http-rust HTTP request handler using Rust | +: | http-swift HTTP request handler using SwiftWasm | +: | http-zig HTTP request handler using Zig | +: | redirect Redirects a HTTP route | +: | redis-go Redis message handler using (Tiny)Go | +: | redis-rust Redis message handler using Rust | +: | static-fileserver Serves static files from an asset directory | +: +------------------------------------------------------------------------+ + +Spin component need ~wasm32-wasi~ target for *Rust* +#+name: target for Rust +#+begin_src shell + rustup target add wasm32-wasi +#+end_src + +#+RESULTS: target for Rust +: info: component 'rust-std' for target 'wasm32-wasi' is up to date +* HTTP Components