Skip to content
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

Update llhttp #691

Merged
merged 3 commits into from
Apr 7, 2021
Merged

Update llhttp #691

merged 3 commits into from
Apr 7, 2021

Conversation

dnlup
Copy link
Contributor

@dnlup dnlup commented Apr 7, 2021

Fixes #690

npm run build-wasm
```

#### Copy the sources to `undici`
Copy link
Contributor Author

Choose a reason for hiding this comment

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

All these steps could be condensed to:

cp build/llhttp/wasm/* <path-to-undici>/lib/llhttp

If we remove the embedding and use the llhttp project build. Just wanted to say that's an option if this is too clumsy.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This guide should be revisited if/when we have to modify lhttp sources for whatever reason.

Copy link
Member

@ronag ronag left a comment

Choose a reason for hiding this comment

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

LGTM.

cp src/native/api.h build/llhttp.h <your-path-to-undici>/deps/llhttp/include/
```

#### Build the WebAssembly module in `undici`
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Also this would not be needed of we didn't embed.

Copy link
Member

Choose a reason for hiding this comment

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

Can we avoid embedding as of now?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, we can. We don't currently modify the source files. IMHO is a cleaner approach, as long as we don't have to customize it. One thing to consider is the direction the llhttp project will take towards wasm. For example, what if the only way to access the build would be by installing it as a dependency and use its .js API (as suggested in nodejs/llhttp#93)? Would we be open to that?

But regarding now, we would just have to run build-wasm in llhttp and copy the build/wasm folder contents in lib/llhttp.

@ronag ronag added this to the 4.0 milestone Apr 7, 2021
Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

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

lgtm

@ronag ronag merged commit 12fe400 into main Apr 7, 2021
@Uzlopak Uzlopak deleted the update_llhttp branch February 21, 2024 12:38
crysmags pushed a commit to crysmags/undici that referenced this pull request Feb 27, 2024
* chore(deps): update llhttp to version 5.0.1

* docs(constributing): add llhttp update guide

* docs(contributing): add docker disclaimer in llhttp guide
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.

Upgrade llhttp
3 participants