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

WASM Plugin for Pixiu #469

Merged
merged 21 commits into from
Aug 30, 2022
Merged

WASM Plugin for Pixiu #469

merged 21 commits into from
Aug 30, 2022

Conversation

maxingg
Copy link
Contributor

@maxingg maxingg commented Aug 7, 2022

What this PR does:
Pixiu supports the WASM plugin mechanism, and provides a simple implementation of WASM plugins.

Which issue(s) this PR fixes:

Fixes #432

Special notes for your reviewer:

Users can choose to load different wasm files which must be stored in the data folder.

@PhilYue PhilYue requested review from PhilYue, ztelur and mark4z August 10, 2022 07:45
pkg/wasm/service.go Outdated Show resolved Hide resolved
pkg/wasm/service.go Show resolved Hide resolved
igt/Makefile Show resolved Hide resolved
split erase in service.go;
error handle filter.go;
@codecov-commenter
Copy link

Codecov Report

Merging #469 (2cbc861) into develop (28e040d) will decrease coverage by 0.05%.
The diff coverage is 0.00%.

@@             Coverage Diff             @@
##           develop     #469      +/-   ##
===========================================
- Coverage    37.26%   37.20%   -0.06%     
===========================================
  Files           56       56              
  Lines         3805     3811       +6     
===========================================
  Hits          1418     1418              
- Misses        2224     2230       +6     
  Partials       163      163              
Impacted Files Coverage Δ
pkg/common/http/manager.go 42.85% <0.00%> (-1.74%) ⬇️
pkg/context/http/context.go 0.00% <0.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

New: func() interface{} {
pwd, _ := os.Getwd()
instance := wasmer.NewWasmerInstanceFromFile(filepath.Join(pwd, cfg.Path))
proxywasm.RegisterImports(instance)
Copy link
Member

Choose a reason for hiding this comment

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

instance 做非空判断,或者提前判断 path 下 wasm 文件是否存在,给出友好 log

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@PhilYue PhilYue merged commit 8d9c623 into apache:develop Aug 30, 2022
@PhilYue PhilYue added this to the 0.6.0 milestone Oct 16, 2022
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.

[ASoC 2022] Pixiu WASM Plugin Support
6 participants