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: add support of wasmtime for webassembly sandbox #47

Merged
merged 3 commits into from
Aug 25, 2023

Conversation

abel-von
Copy link
Collaborator

support wasmtime as the wasm runtime for webassembly sandbox.
it use async feature of wasmtime and launch the instance inside the process, without forking a new process.
and the limit of memory is supported by wasmtime ResourceLimiter.
the cpu limitation of wasmtime is made by a "fuel" machanism and I am not sure how to make it follow the cpu quota limitation of containers. so cpu limitation is still not supported.

@abel-von abel-von force-pushed the support-wasmtime branch 9 times, most recently from d97af9a to 7f5e938 Compare July 18, 2023 13:00
Signed-off-by: Abel Feng <fshb1988@gmail.com>
The crate of "mach" which is indirectly dependence introduces by
wasmtime-runtime, is in the license of BSD-2-Clause, we have to allow
it, otherwise we can not use wasmtime.

The Modified or New BSD (or BSD 3-clause) license is the same as BSD-2,
but with an additional clause prohibiting the names of the authors from
being used to endorse or promote products relating to the software.

As BSD-3-Clause is allowed, we have to reason to deny BSD-2-Clause

Signed-off-by: Abel Feng <fshb1988@gmail.com>
otherwise some checks my get a name confliction error because some
functions is implemented in different features, and annotated by the
feature.

Signed-off-by: Abel Feng <fshb1988@gmail.com>
@abel-von abel-von force-pushed the support-wasmtime branch 2 times, most recently from c125f46 to 46c7e87 Compare August 25, 2023 08:10
@abel-von abel-von closed this Aug 25, 2023
@abel-von abel-von reopened this Aug 25, 2023
Copy link
Member

@Burning1020 Burning1020 left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks

@Burning1020 Burning1020 merged commit d5eca4c into kuasar-io:main Aug 25, 2023
Vanient pushed a commit to Vanient/kuasar that referenced this pull request Aug 28, 2023
Vanient pushed a commit to Vanient/kuasar that referenced this pull request Aug 28, 2023
@Burning1020 Burning1020 mentioned this pull request Sep 6, 2023
7 tasks
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.

2 participants