-
-
Notifications
You must be signed in to change notification settings - Fork 91
Introduce Spicy parser framework with HTTP parser implementation #186
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
Open
Boolean-Autocrat
wants to merge
13
commits into
mushorg:gsoc2025/issue-184
Choose a base branch
from
Boolean-Autocrat:spicy-bridge
base: gsoc2025/issue-184
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
c9c7764
feat: introduces Spicy runtime bridge and initial Spicy-HTTP parser
Boolean-Autocrat d9a6e3b
feat: adds basic and relevant function documentation for bridge and p…
Boolean-Autocrat 722a49e
chore: hardens Spicy bridge - OOM-safe growth, parse timeout, HTTP si…
Boolean-Autocrat c7c1e39
chore: hardens C++ glue, adds depth guard & OOM-safe field handling
Boolean-Autocrat 5a1ccd6
feat: adds tests for parser and Spicy http handler
Boolean-Autocrat 49b6c58
chore: tightens up parser tests, adds relevant comments for helpers
Boolean-Autocrat 7052c45
refactor: update GitHub Actions to install Spicy C++ runtime, bumps G…
Boolean-Autocrat 60ca1d6
fix: adds CI step for generating Spicy files
Boolean-Autocrat aec7036
fix: adds Spicy CLI to actions runner path
Boolean-Autocrat e933fdb
chore: adds missing ldflags to make build
Boolean-Autocrat 51ed6f2
chore: adds error handling for failed file read
Boolean-Autocrat a970c55
refactor: rename inner `raw` variable to `r` in drain goroutine
Boolean-Autocrat 4001b4a
refactor: normalizes proto name before parser lookup
Boolean-Autocrat File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -37,3 +37,7 @@ poc/ | |
|
|
||
| # Dev | ||
| .vscode | ||
|
|
||
| # Spicy generated files | ||
| protocols/spicy/*.cc | ||
| protocols/spicy/parsers/*.h | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -24,3 +24,6 @@ producers: | |
|
|
||
| conn_timeout: 45 | ||
| max_tcp_payload: 4096 | ||
|
|
||
| spicy: | ||
| enabled: true | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| GRAMMARS := $(wildcard parsers/*.spicy) | ||
|
|
||
| GEN_CC := $(notdir $(GRAMMARS:.spicy=.cc)) | ||
| LINKER_CC := $(notdir $(patsubst parsers/%.spicy,spicy_linker_%.cc,$(GRAMMARS))) | ||
| HEADERS := $(patsubst parsers/%.spicy,parsers/%.h,$(GRAMMARS)) | ||
|
|
||
| SPICY_FLAGS := -g | ||
| CXX ?= clang++ | ||
| CXXFLAGS += -I/opt/spicy/include -std=c++17 -fPIC -O3 -DNDEBUG -fvisibility=hidden -I$(CURDIR)/parsers | ||
|
|
||
| .SECONDARY: $(GEN_CC) $(LINKER_CC) $(HEADERS) | ||
|
|
||
| %.cc: parsers/%.spicy | ||
| @echo "spicyc -c $< -> $@" | ||
| spicyc -c $(SPICY_FLAGS) $< -o $@ | ||
|
|
||
| parsers/%.h: parsers/%.spicy | ||
| @echo "spicyc -P parsers/$* -o $@ $<" | ||
| spicyc -P parsers/$* -o $@ $< | ||
|
|
||
| spicy_linker_%.cc: parsers/%.spicy %.cc | ||
| @echo "spicyc -l $< -> $@" | ||
| spicyc -l $(SPICY_FLAGS) $< -o $@ | ||
|
|
||
| .PHONY: all | ||
| all: $(GEN_CC) $(LINKER_CC) $(HEADERS) | ||
|
|
||
| .PHONY: clean | ||
| clean: | ||
| rm -f $(GEN_CC) $(LINKER_CC) $(HEADERS) |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.