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

libwasmtime: extract reusable functions from the binary #220

Closed

Conversation

steveej
Copy link
Contributor

@steveej steveej commented Jul 24, 2019

The intention is kick of the process of building an abstraction library
over all subcrates, which can be embedded in any application which wants
to run WASM modules. The wasmtime binary acts as the first consumer of
this library.

The intention is kick of the process of building an abstraction library
over all subcrates, which can be embedded in any application which wants
to run WASM modules. The wasmtime binary acts as the first consumer of
this library.
@steveej
Copy link
Contributor Author

steveej commented Aug 21, 2019

AFAICT this is has been superseded by #287. @yurydelendik what could I add here (after a rebase) that's still missing in the new API?

@yurydelendik
Copy link
Contributor

what could I add here (after a rebase) that's still missing in the new API?

I'm not sure what can be added to this PR. The intent of #287 to allow use classes from wasmtime-api instead of relying on internal classes from wasmtime_jit or wasmtime_runtime, which addresses the same issue: "building an abstraction library over all subcrates". Additional goal is also to provide standard meaning of embedding wasmtime into the C application.

@steveej Is that anything missing in wasmtime-api that included in this PR? I'll be glad to quickly add it to the wasmtime-api.

@steveej
Copy link
Contributor Author

steveej commented Aug 21, 2019

@steveej Is that anything missing in wasmtime-api that included in this PR? I'll be glad to quickly add it to the wasmtime-api.

I'm building an example on top of the current API. I'll report back here if I found anything missing or otherwise close the PR.

@yurydelendik
Copy link
Contributor

yurydelendik commented Aug 21, 2019

I'm sorry for the confusion. The wasmtime binary's status at this moment is similar to the example that demonstrate usage of the wasmtime-api, so there is no much sense to wrap it into the library.

If you need more examples and "roadmap features" for wasmtime-api, check out https://github.com/CraneStation/wasmtime/blob/master/wasmtime-api/examples/gcd.rs and C/C++ examples at https://github.com/WebAssembly/wasm-c-api/tree/master/example .

@steveej
Copy link
Contributor Author

steveej commented Aug 21, 2019

I'm sorry for the confusion.

I'm not aware of any confusion, Still, no worries at all :-) What I meant by my last comment is that I'm currently building an example on the new API you wrote which was merged in #287 to see if it satisfies all the requirements that we currently have on wasmtime.

I've found the GCD example also, thanks! I've used to get started after I saw the PR.

@sunfishcode
Copy link
Member

Thanks for the discussion here! Following up on #220 (comment), if you find anything inadequate in the wasmtime API crate, please file a new issue!

grishasobol pushed a commit to grishasobol/wasmtime that referenced this pull request Nov 29, 2021
mooori added a commit to mooori/wasmtime that referenced this pull request Feb 15, 2024
docs: add some docs to `run-tests-zkasm.js`
frank-emrich added a commit to frank-emrich/wasmtime that referenced this pull request Sep 3, 2024
This PR performs a refactoring required by a follow-up PR that will
implement actual pooling of `VMContRef`s.

This PR removes the types `Fiber` and `Suspend` from the `fibre` create
(i.e., our version of `wasmtime-fiber`). These two types are effectively
leftovers from `wasmtime-fiber`, but only add a layer of unnecessary
indirection at this point.

Note that the `fibre::FiberStack` type remains. Some functions
originally implemented on `Fiber` are moved to `FiberStack` now.
Further, the `VMContRef` definition used in the optimized implementation
now owns a `fibre::FiberStack` directly, rather than storing a `Fiber`
as a wrapper around the `FiberStack`.

This PR does not affect the baseline implementation since it doesn't use
the `fibre` crate at all.
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.

3 participants