From 833dc9d3b6b3a0f762e87afafc2d361c5f91ab1d Mon Sep 17 00:00:00 2001 From: Val Date: Sun, 22 Feb 2026 14:13:08 +0100 Subject: [PATCH 1/2] remove platform guard on reuseaddr --- lightbug_http/connection.mojo | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/lightbug_http/connection.mojo b/lightbug_http/connection.mojo index f00ca52d..47c28d23 100644 --- a/lightbug_http/connection.mojo +++ b/lightbug_http/connection.mojo @@ -239,14 +239,11 @@ struct ListenConfig: except socket_err: raise SocketCreationError() - @parameter - # TODO: do we want to add SO_REUSEPORT on linux? Doesn't work on some systems - if CompilationTarget.is_macos(): - try: - socket.set_socket_option(SocketOption.SO_REUSEADDR, 1) - except sockopt_err: - # Socket option failure is not fatal, just continue - pass + try: + socket.set_socket_option(SocketOption.SO_REUSEADDR, 1) + except sockopt_err: + # Socket option failure is not fatal, just continue + pass var addr = TCPAddr[network](ip=local.host^, port=local.port) var bind_success = False From 9f267fbcdbb13321add14e281b8ddfbe1c14090d Mon Sep 17 00:00:00 2001 From: Val Date: Sun, 22 Feb 2026 14:21:44 +0100 Subject: [PATCH 2/2] add devcontainer.json --- .devcontainer/devcontainer.json | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 .devcontainer/devcontainer.json diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 00000000..4c7fd6ad --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,11 @@ +{ + "name": "Lightbug HTTP (Linux)", + "image": "ghcr.io/prefix-dev/pixi:latest", + "postCreateCommand": "apt-get update && apt-get install -y git && pixi install", + "forwardPorts": [8080], + "customizations": { + "vscode": { + "extensions": ["modular-mojotools.vscode-mojo"] + } + } +}