coraza
coraza copied to clipboard
Tinygo support
Summary
Tinygo is desirable as it would open doors for delivering coraza features in embedded runtimes like wasm. Currently tinygo has a set of limitations in terms of support of stdlib and hence we need to decide if we want to support tinygo as a first class or shall we be able to deliver tinygo integration (which requires coraza to be more flexible)
Notably, libraries like encoding/xml
isn't supported and there is no easy replacement for it.
Motivation
Provide coraza as a wasm plugin for envoy.
The changes were approved in the last meeting.
Please try to compile Coraza removing JSON and XML support and we will use that as a starting point.
Project requirements
- Build constraints, we should add special building tags, so tinygo support doesn't mess with standard go. For tinygo we would have to run
tinygo build -tags tinygo *.go
And files with compatibility issues must have multiple versions, for example:
// bodyprocessors/json_tinygo.go
// build: +tinygo
package bodyprocessors
import json"github.com/buger/jsonparser"
//...
}
// bodyprocessors/json.go
// build: !tinygo
package bodyprocessors
import "encoding/json"
//...
}
- Tests must be created, they must cover:
- Import Coraza using WASM
- Running CRS
Under development
This issue is stale because it has been open for 30 days with no activity.
This issue was closed because it has been inactive for 14 days since being marked as stale.
I am curious on why this has been closed and I have no option to reopen it. Sounds like a mistake, issue isn't resolved but I guess dependabot isn't smart enough to realise the truth cc @jptosso
This issue is stale because it has been open for 30 days with no activity.
This issue was closed because it has been inactive for 14 days since being marked as stale.
This issue is stale because it has been open for 30 days with no activity.
Already merged