8000 Add HTTP Server to `net` by Nicell · Pull Request #105 · luau-lang/lute · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Add HTTP Server to net #105

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 16 commits into from
Mar 21, 2025
Merged

Add HTTP Server to net #105

merged 16 commits into from
Mar 21, 2025

Conversation

Nicell
Copy link
Collaborator
@Nicell Nicell commented Mar 15, 2025

Adds an http server to net. This server is backed by uWebSockets, a very fast, standards-compliant HTTP/WebSocket server that powers bun also. The API isn't fully thought through yet, but this is a start. Other things to think about include:

  • WebSockets
  • TLS
  • Routes
  • Port reuse (and errors when port binding fails)
  • Request and response body streaming

The above things seem like they can be follow up PRs since we don't have a stable API. For now this is a basic API we can play around with and build off of.

@Nicell Nicell force-pushed the uwebsockets branch from 2a2379a 8000 to 8404c8b Compare March 17, 2025 01:35
@Nicell Nicell marked this pull request as ready for review March 17, 2025 01:36
Copy link
Collaborator
@aatxe aatxe left a comment

Choose a reason for hiding this comment

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

Can you delete the manually vendored uWebSockets and add it using git subrepo? You'll have to install it as a separate tool, but it makes the management of this stuff much less painful for us longer term.

@aatxe
Copy link
Collaborator
aatxe commented Mar 19, 2025

We have learned that git-subrepo does not play nicely with submodules and uWebSockets, naturally, uses submodules and Make. I think the right way forward here is to build a little bit of dependency management into luthier. I'm going to look into that first.

aatxe added a commit that referenced this pull request Mar 19, 2025
We've already hit a wall with git-subrepo in #105 because subrepos
interact awfully with submodules. All of this is miserable, and I think
we're going to go the way that every mid-sized C++ project with
dependencies must go to stay sane: embracing their own bespoke tool. As
such, I've replaced the check-in for every dependency here with a
`foo.tune` file in `extern` that describes the remote source and the tag
that we would like to check out, and `luthier` now has the ability to
fetch dependencies. It will do this as part of a `configure` step, but
you can also invoke it directly with the `fetch` subcommand.
@Nicell Nicell requested a review from aatxe March 20, 2025 02:27
Copy link
Collaborator
@aatxe aatxe left a comment

Choose a reason for hiding this comment

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

Looks good so far, going to look more carefully through the serve implementation tomorrow before final approval though.

Copy link
Collaborator
@aatxe aatxe left a comment

Choose a reason for hiding this comment

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

Some minor feedback on some of the net.cpp implementation, but otherwise I think this is good to go.

@Nicell Nicell requested a review from aatxe March 21, 2025 22:50
@aatxe aatxe merged commit e22c154 into luau-lang:primary Mar 21, 2025
4 checks passed
@Nicell Nicell deleted the uwebsockets branch March 21, 2025 23:44
green-real pushed a commit to green-real/lute that referenced this pull request May 19, 2025
We've already hit a wall with git-subrepo in luau-lang#105 because subrepos
interact awfully with submodules. All of this is miserable, and I think
we're going to go the way that every mid-sized C++ project with
dependencies must go to stay sane: embracing their own bespoke tool. As
such, I've replaced the check-in for every dependency here with a
`foo.tune` file in `extern` that describes the remote source and the tag
that we would like to check out, and `luthier` now has the ability to
fetch dependencies. It will do this as part of a `configure` step, but
you can also invoke it directly with the `fetch` subcommand.
green-real pushed a commit to green-real/lute that referenced this pull request May 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0