Skip to content

feat: align Cowboy bindings with cowboy 2.14 module structure#21

Merged
dbrattli merged 1 commit intomainfrom
feat/cowboy-bindings-alignment
Mar 21, 2026
Merged

feat: align Cowboy bindings with cowboy 2.14 module structure#21
dbrattli merged 1 commit intomainfrom
feat/cowboy-bindings-alignment

Conversation

@dbrattli
Copy link
Collaborator

Summary

  • Move route and hostRule helpers from Cowboy.fs to CowboyRouter.fs to match the Erlang module they belong to (cowboy_router)
  • Add getEnv/setEnv bindings to Cowboy.fs (maps to cowboy:get_env/2 and cowboy:set_env/3)
  • Remove protoOpts/transportOpts convenience helpers that don't correspond to any cowboy module function and were too narrow (port-only / dispatch-only)
  • Make hostRule accept an explicit host parameter instead of hardcoding '_', matching the actual {HostMatch, PathList} dispatch format
  • Update doc URLs from 2.12 to 2.14

Test plan

  • Verify bindings compile with dotnet build
  • Test CowboyRouter.route, CowboyRouter.hostRule, and CowboyRouter.compile produce correct Erlang terms
  • Test Cowboy.getEnv and Cowboy.setEnv against a running listener

🤖 Generated with Claude Code

Move route/hostRule helpers from Cowboy.fs to CowboyRouter.fs where they
belong (router dispatch data structures). Add getEnv/setEnv bindings to
Cowboy.fs. Remove narrow protoOpts/transportOpts helpers that don't map
to real cowboy module functions. Update doc URLs to 2.14.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@dbrattli dbrattli merged commit ffc2eba into main Mar 21, 2026
2 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.

1 participant