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

c-api: expose tail call configuration option in c api #7811

Merged
merged 1 commit into from
Jan 24, 2024
Merged

c-api: expose tail call configuration option in c api #7811

merged 1 commit into from
Jan 24, 2024

Conversation

womeier
Copy link
Contributor

@womeier womeier commented Jan 24, 2024

The tail call proposal configuration is not yet exposed by the C api.
This change intends to allow configuring the option in e.g. the python library bindings:
bytecodealliance/wasmtime-py#204

I wanted to test this change doing the following:

Following the docs, I ran
cargo build --release --manifest-path crates/c-api/Cargo.toml which should place libwasmtime.{a,so} in target/release.
The command succeeded, but the file is not generated (and I cannot find libwasmtime.so with find).

I thus didn't test the change further than the fact that it compiles, in particular I didn't yet test the change
with the python library.

Tested to work together with the PR: bytecodealliance/wasmtime-py#205 adjusting the python bindings.

@womeier womeier changed the title c-api: expose tail call configuration option to c api c-api: expose tail call configuration option in c api Jan 24, 2024
@github-actions github-actions bot added the wasmtime:c-api Issues pertaining to the C API. label Jan 24, 2024
@womeier womeier marked this pull request as ready for review January 24, 2024 21:16
@womeier womeier requested a review from a team as a code owner January 24, 2024 21:16
@womeier womeier requested review from pchickey and removed request for a team January 24, 2024 21:16
@alexcrichton
Copy link
Member

Looks great to me, thanks! Apologies for the documentation but it's outdated. Nowadays the correct invocation is with -p wasmtime-c-api instead of --manifest-path .... I'll send a separate PR to update those docs.

Copy link

Subscribe to Label Action

cc @peterhuene

This issue or pull request has been labeled: "wasmtime:c-api"

Thus the following users have been cc'd because of the following labels:

  • peterhuene: wasmtime:c-api

To subscribe or unsubscribe from this label, edit the .github/subscribe-to-label.json configuration file.

Learn more.

@womeier
Copy link
Contributor Author

womeier commented Jan 24, 2024

Thanks for the quick response @alexcrichton!

I created a PR with the changes to the python bindings, they work as expected together, i.e. I can run my wasm module with tail calls using the python lib :)

@alexcrichton alexcrichton added this pull request to the merge queue Jan 24, 2024
Merged via the queue into bytecodealliance:main with commit 3e68c4a Jan 24, 2024
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wasmtime:c-api Issues pertaining to the C API.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants