Skip to content

Feature/lab12 – Submission: Add WASM Spin endpoint#1318

Open
kujifined wants to merge 1 commit into
inno-devops-labs:mainfrom
kujifined:feature/lab12
Open

Feature/lab12 – Submission: Add WASM Spin endpoint#1318
kujifined wants to merge 1 commit into
inno-devops-labs:mainfrom
kujifined:feature/lab12

Conversation

@kujifined

Copy link
Copy Markdown

Goal

Build a QuickNotes-style Moscow time endpoint as a WebAssembly component with Spin, compare it against the Lab 6 Docker baseline, and add a standalone WASI/wasmtime bonus implementation.

Changes

  • Added a Spin Go SDK HTTP component in wasm/moscow-time
  • Implemented GET /time returning Moscow time JSON with unix, iso, hour_minute, timezone, and utc_offset
  • Configured spin.toml with /time routing, TinyGo wasip1 build, -buildmode=c-shared, and allowed_outbound_hosts = []
  • Added a standalone WASI CLI implementation in wasm-cli for the bonus task
  • Documented tool versions, build/run commands, curl output, artifact sizes, cold-start results, warm latency p50/p95, and design-question answers in submissions/lab12.md

Testing

  • spin build
  • spin up --listen 127.0.0.1:3000
  • curl -s http://127.0.0.1:3000/time | python3 -m json.tool
  • tinygo build -o main.wasm -target=wasi -no-debug ./main.go
  • wasmtime run --env REQUEST_METHOD=GET --env PATH_INFO=/time main.wasm
  • hyperfine --warmup 5 --runs 50 for warm latency measurements
  • Collected 5 cold-start samples for both Spin/WASM and the Lab 6 Docker baseline

Checklist

  • Title is a clear sentence (≤ 70 chars)
  • Commits are signed (git log --show-signature)
  • submissions/lab12.md updated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant