Stream: git-wasmtime

Topic: wasmtime / PR #5761 c-api: wasmtime_store_limiter


view this post on Zulip Wasmtime GitHub notifications bot (Feb 10 2023 at 14:01):

LukasForst opened PR #5761 from main to main:

This was not yet discussed, but as of now, there's no way how to use StoreLimits from the C API. This PR adds wasmtime_store_limiter that allows setting supported limits for the Store.

Not sure who to assign for this PR, judging from the past PRs for c-api @alexcrichton maybe?

view this post on Zulip Wasmtime GitHub notifications bot (Feb 10 2023 at 20:40):

alexcrichton submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Feb 10 2023 at 20:40):

alexcrichton created PR review comment:

I think there's a case to be made for allowing precisely 0 of the above items, so could this instead perhaps use a negative value to indicate "use the default"?

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

LukasForst submitted PR review.

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

LukasForst created PR review comment:

I was thinking about this as well, but in that case we would need to use different types then usize and u32. What do you suggest using instead of these?

view this post on Zulip Wasmtime GitHub notifications bot (Feb 11 2023 at 22:29):

alexcrichton submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Feb 11 2023 at 22:29):

alexcrichton created PR review comment:

For some of these values the range of 0..i32::MAX is sufficient (or even isize::MAX). Otherwise though you could also add a dedicated struct with getters/setters where not calling a setter is equivalent to "none" or something like that. I don't know the best way to handle optional parameters in C myself.

view this post on Zulip Wasmtime GitHub notifications bot (Feb 13 2023 at 08:42):

LukasForst created PR review comment:

struct is not perfect, you'd end up with same problems, even if you use pointers on integers.. because then (afaik) you wouldn't be able to distinguish 0 and NULL.

Let's go with -1 as indication "to leave default" and i64 for all types. That way we keep the ranges "sort of same" and we will have a way to use 0 as a correct value.

view this post on Zulip Wasmtime GitHub notifications bot (Feb 13 2023 at 08:42):

LukasForst submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Feb 13 2023 at 08:47):

LukasForst updated PR #5761 from main to main.

view this post on Zulip Wasmtime GitHub notifications bot (Feb 13 2023 at 08:49):

LukasForst requested alexcrichton for a review on PR #5761.

view this post on Zulip Wasmtime GitHub notifications bot (Feb 13 2023 at 08:59):

LukasForst edited PR review comment.

view this post on Zulip Wasmtime GitHub notifications bot (Feb 13 2023 at 08:59):

LukasForst edited PR review comment.

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

LukasForst updated PR #5761 from main to main.

view this post on Zulip Wasmtime GitHub notifications bot (Feb 13 2023 at 15:53):

alexcrichton submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Feb 13 2023 at 15:53):

alexcrichton has enabled auto merge for PR #5761.

view this post on Zulip Wasmtime GitHub notifications bot (Feb 13 2023 at 15:53):

alexcrichton has disabled auto merge for PR #5761.

view this post on Zulip Wasmtime GitHub notifications bot (Feb 13 2023 at 15:53):

alexcrichton closed without merge PR #5761.

view this post on Zulip Wasmtime GitHub notifications bot (Feb 13 2023 at 15:53):

alexcrichton reopened PR #5761 from main to main.

view this post on Zulip Wasmtime GitHub notifications bot (Feb 13 2023 at 15:54):

alexcrichton has enabled auto merge for PR #5761.

view this post on Zulip Wasmtime GitHub notifications bot (Feb 13 2023 at 17:18):

alexcrichton merged PR #5761.


Last updated: Nov 22 2024 at 16:03 UTC