Skip to content

feat: wsgi server#1710

Closed
Dario Valdespino (darvld) wants to merge 10 commits intomainfrom
feat/wsgi
Closed

feat: wsgi server#1710
Dario Valdespino (darvld) wants to merge 10 commits intomainfrom
feat/wsgi

Conversation

@darvld
Copy link
Member

@darvld Dario Valdespino (darvld) commented Oct 24, 2025

Ready for review Powered by Pull Request Badge

Summary

This PR introduces a new feature for elide serve: the ability to use Elide as a WSGI server, with verified drop-in compatibility for Flask (without Elide's custom Flask intrinsics). The server fully implements the minimal requirements of specification and will be extended over time with additional features.

Applications running on Elide WSGI have full access to Elide APIs, allowing them to access secrets, make LLM calls, and run JS code to render React server-side.

Depends on #1709

Signed-off-by: Dario Valdespino <dvaldespino00@gmail.com>
Signed-off-by: Dario Valdespino <dvaldespino00@gmail.com>
Signed-off-by: Dario Valdespino <dvaldespino00@gmail.com>
Signed-off-by: Dario Valdespino <dvaldespino00@gmail.com>
Signed-off-by: Dario Valdespino <dvaldespino00@gmail.com>
Signed-off-by: Dario Valdespino <dvaldespino00@gmail.com>
Signed-off-by: Dario Valdespino <dvaldespino00@gmail.com>
Signed-off-by: Dario Valdespino <dvaldespino00@gmail.com>
@darvld Dario Valdespino (darvld) added feature Large PRs or issues with full-blown features lang:python Issues relating to Python labels Oct 24, 2025
Signed-off-by: Dario Valdespino <dvaldespino00@gmail.com>
Signed-off-by: Dario Valdespino <dvaldespino00@gmail.com>
@codecov
Copy link

codecov bot commented Oct 24, 2025

Codecov Report

❌ Patch coverage is 6.13288% with 551 lines in your changes missing coverage. Please review.
✅ Project coverage is 39.65%. Comparing base (cd30fef) to head (e974458).
⚠️ Report is 59 commits behind head on main.

Files with missing lines Patch % Lines
.../intrinsics/server/http/v2/wsgi/WsgiInputStream.kt 0.00% 127 Missing ⚠️
.../intrinsics/server/http/v2/wsgi/ElideWsgiServer.kt 0.00% 102 Missing ⚠️
...lin/elide/runtime/exec/ContextAwareExecutorBase.kt 8.24% 89 Missing ⚠️
.../intrinsics/server/http/v2/wsgi/WsgiErrorStream.kt 0.00% 58 Missing ⚠️
...rinsics/server/http/v2/flask/FlaskHttpIntrinsic.kt 7.84% 47 Missing ⚠️
...kotlin/elide/tool/cli/cmd/repl/ToolShellCommand.kt 14.89% 35 Missing and 5 partials ⚠️
.../intrinsics/server/http/v2/wsgi/WsgiHttpContext.kt 0.00% 37 Missing ⚠️
...otlin/elide/runtime/exec/ContextAwareDispatcher.kt 0.00% 16 Missing ⚠️
...src/main/kotlin/elide/runtime/exec/ContextLocal.kt 30.00% 7 Missing ⚠️
...e/tooling/project/manifest/ElidePackageManifest.kt 0.00% 7 Missing ⚠️
... and 8 more
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1710      +/-   ##
==========================================
- Coverage   40.36%   39.65%   -0.72%     
==========================================
  Files         883      892       +9     
  Lines       40893    37411    -3482     
  Branches     5662     5760      +98     
==========================================
- Hits        16507    14835    -1672     
+ Misses      22449    20632    -1817     
- Partials     1937     1944       +7     
Flag Coverage Δ
jvm 39.65% <6.13%> (-0.72%) ⬇️
lib 39.65% <6.13%> (-0.72%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...time/gvm/intrinsics/BuildTimeIntrinsicsResolver.kt 100.00% <100.00%> (ø)
...ain/kotlin/elide/tool/cli/options/ServerOptions.kt 50.00% <0.00%> (-3.34%) ⬇️
...rc/main/kotlin/elide/runtime/exec/PinnedContext.kt 0.00% <0.00%> (ø)
...lin/elide/runtime/core/InternalRuntimeException.kt 0.00% <0.00%> (ø)
.../main/kotlin/elide/runtime/core/RuntimeExecutor.kt 60.00% <60.00%> (ø)
...de/runtime/intrinsics/server/http/v2/HttpServer.kt 8.10% <50.00%> (ø)
.../kotlin/elide/runtime/exec/ContextAwareExecutor.kt 25.00% <25.00%> (ø)
...main/kotlin/elide/runtime/plugins/python/Python.kt 75.75% <55.55%> (+4.60%) ⬆️
...sics/server/http/v2/guest/GuestIteratorProducer.kt 0.00% <0.00%> (ø)
...src/main/kotlin/elide/runtime/exec/ContextLocal.kt 30.00% <30.00%> (ø)
... and 9 more

... and 585 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update cd30fef...e974458. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@darvld Dario Valdespino (darvld) marked this pull request as draft October 30, 2025 16:27
@darvld
Copy link
Member Author

Converting back to draft for now, possibly superseded by an upcoming PR

@sgammon Sam Gammon (sgammon) added this to the Release R18: Beta milestone Nov 2, 2025
@darvld
Copy link
Member Author

superseded by #1736

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

Labels

feature Large PRs or issues with full-blown features lang:python Issues relating to Python

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants