Stream: git-wasmtime

Topic: wasmtime / PR #6359 add C API for epoch_deadline_callback...


view this post on Zulip Wasmtime GitHub notifications bot (May 09 2023 at 14:17):

theothergraham edited PR #6359:

issue #6277

This adds C API interfaces to:

  1. Set the epoch deadline callback to a C function
  2. Create a wasmtime_error_t from C

view this post on Zulip Wasmtime GitHub notifications bot (May 09 2023 at 14:36):

theothergraham updated PR #6359.

view this post on Zulip Wasmtime GitHub notifications bot (May 09 2023 at 14:51):

alexcrichton submitted PR review:

Looks reasonable to me, thanks!

view this post on Zulip Wasmtime GitHub notifications bot (May 09 2023 at 14:51):

alexcrichton submitted PR review:

Looks reasonable to me, thanks!

view this post on Zulip Wasmtime GitHub notifications bot (May 09 2023 at 14:51):

alexcrichton created PR review comment:

I think instead of :? this should use .to_str() on the pointer received to avoid Rust-level string escaping which shows up in the debug representation.

view this post on Zulip Wasmtime GitHub notifications bot (May 09 2023 at 15:40):

theothergraham created PR review comment:

.to_str() leaves me with the potential to get a Utf8Error instead of a &str. I was not sure what the preferred way to deal with such bad input would be, but based on what I see in crates/c-api/src/trap.rs, I think I will go with String::from_utf8_lossy(). Sound good?

view this post on Zulip Wasmtime GitHub notifications bot (May 09 2023 at 16:36):

alexcrichton created PR review comment:

Yeah I think the _lossy variant is fine. That's a reality of working with cross-language FFI here but in the context of "just an error message" the lossy variant should be fine.

view this post on Zulip Wasmtime GitHub notifications bot (May 09 2023 at 16:52):

theothergraham updated PR #6359.

view this post on Zulip Wasmtime GitHub notifications bot (May 09 2023 at 16:53):

theothergraham created PR review comment:

Thanks, revised.

view this post on Zulip Wasmtime GitHub notifications bot (May 09 2023 at 17:00):

alexcrichton has enabled auto merge for PR #6359.

view this post on Zulip Wasmtime GitHub notifications bot (May 09 2023 at 17:59):

alexcrichton merged PR #6359.


Last updated: Dec 23 2024 at 12:05 UTC