Skip to content

feat: implement POST /analyze/wasm endpoint with spawn_blocking#94

Merged
GideonBature merged 3 commits intoSoroLabs:mainfrom
System625:feat/analyze-wasm-endpoint
Mar 25, 2026
Merged

feat: implement POST /analyze/wasm endpoint with spawn_blocking#94
GideonBature merged 3 commits intoSoroLabs:mainfrom
System625:feat/analyze-wasm-endpoint

Conversation

@System625
Copy link
Copy Markdown
Contributor

Closes #6

Adds POST /analyze/wasm — accepts base64-encoded WASM bytes, a function
name, and optional args, then returns a ResourceReport with CPU/RAM
metrics.

Changes

  • simulation.rs: adds profile_contract (sync) using soroban_sdk::Env
    for local simulation
  • main.rs: adds AnalyzeWasmRequest, analyze_wasm handler, route under JWT auth middleware, and OpenAPI registration

Soroban simulation is CPU-intensive; tokio::task::spawn_blocking keeps
the async runtime unblocked during analysis.

@drips-wave
Copy link
Copy Markdown

drips-wave bot commented Mar 23, 2026

@System625 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

Copy link
Copy Markdown
Collaborator

@GideonBature GideonBature left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK

@GideonBature GideonBature merged commit 0d10415 into SoroLabs:main Mar 25, 2026
2 of 4 checks passed
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.

Implement POST /analyze Endpoint

2 participants