Skip to content

TypeScript HTTP handlers - Module Bindings#4980

Open
JasonAtClockwork wants to merge 5 commits into
phoebe/http-handler/v8-hostfrom
jlarabie/http-handler/v8-host/module
Open

TypeScript HTTP handlers - Module Bindings#4980
JasonAtClockwork wants to merge 5 commits into
phoebe/http-handler/v8-hostfrom
jlarabie/http-handler/v8-host/module

Conversation

@JasonAtClockwork
Copy link
Copy Markdown
Contributor

Description of Changes

Cleaning up the TypeScript HTTP handler module bindings on top of the V8 host/module work from #4931.

  • Consolidate the inbound handler API around http_handlers.ts
  • keeps outbound procedure HTTP in http_internal.ts
  • moves shared HTTP code into http_shared.ts to avoid dependency issues
  • moves the inbound wire/runtime bridge into runtime.ts

API and ABI breaking changes

Cleaning up the API layer:

  • spacetimedb.httpHandler(...)
  • spacetimedb.httpRouter(...)
  • Router
  • handler-side Request

Expected complexity level and risk

2 - I needed to move code out of http_internal.ts to have it shareable for http_handler.ts adding more churn than I'd like.

Testing

  • Expanded the smoketests
  • Expanded unit test coverage
  • Local throwaway test suite

@JasonAtClockwork JasonAtClockwork self-assigned this May 8, 2026
Copy link
Copy Markdown
Contributor

@gefjon gefjon left a comment

Choose a reason for hiding this comment

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

In crates/smoketests/tests/smoketests/http_routes.rs, can you remove the typescript_http_routes_end_to_end test, and instead add a TypeScript version of each of the Rust module smoketests in that file? Otherwise this all looks good to my undtrained eye.

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.

2 participants