Stream: git-wasmtime

Topic: wasmtime / PR #2249 Rework the interface of cranelift-module


view this post on Zulip Wasmtime GitHub notifications bot (Sep 30 2020 at 18:54):

bjorn3 opened PR #2249 from module_rework to main:

The old design has a Module struct that wraps around a Backend implementation. Because the Backend is not exposed it is not possible to export extra methods to do things like deallocating specific functions or adding new predefined imports for the jit. It is also not possible to customise the behavior of existing methods to for example allow replacing an already defined function for hot code swapping. It was also not possible to create a module with a non-static lifetime (required for headcrab-inject) In the new design Module is instead a trait with ModuleDeclarations being a struct for some shared behavior regarding how declarations are handled. As the Module is fully exposed, it is possible to add new methlds to the api of every module and customize the behavior of existing methods. None of the previously mentioned use cases are implemented yet. I will leave that for a future PR.

Also fixes #1691

view this post on Zulip Wasmtime GitHub notifications bot (Sep 30 2020 at 18:59):

pchickey requested pchickey for a review on PR #2249.

view this post on Zulip Wasmtime GitHub notifications bot (Sep 30 2020 at 23:29):

sunfishcode submitted PR Review.

view this post on Zulip Wasmtime GitHub notifications bot (Sep 30 2020 at 23:29):

sunfishcode created PR Review Comment:

Please document whether this is in bytes or in log2(bytes).

view this post on Zulip Wasmtime GitHub notifications bot (Sep 30 2020 at 23:30):

sunfishcode edited PR Review Comment.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 01 2020 at 07:53):

bjorn3 updated PR #2249 from module_rework to main:

The old design has a Module struct that wraps around a Backend implementation. Because the Backend is not exposed it is not possible to export extra methods to do things like deallocating specific functions or adding new predefined imports for the jit. It is also not possible to customise the behavior of existing methods to for example allow replacing an already defined function for hot code swapping. It was also not possible to create a module with a non-static lifetime (required for headcrab-inject) In the new design Module is instead a trait with ModuleDeclarations being a struct for some shared behavior regarding how declarations are handled. As the Module is fully exposed, it is possible to add new methlds to the api of every module and customize the behavior of existing methods. None of the previously mentioned use cases are implemented yet. I will leave that for a future PR.

Also fixes #1691

view this post on Zulip Wasmtime GitHub notifications bot (Oct 01 2020 at 07:53):

bjorn3 submitted PR Review.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 01 2020 at 07:53):

bjorn3 created PR Review Comment:

Done

view this post on Zulip Wasmtime GitHub notifications bot (Oct 08 2020 at 08:04):

bjorn3 updated PR #2249 from module_rework to main:

The old design has a Module struct that wraps around a Backend implementation. Because the Backend is not exposed it is not possible to export extra methods to do things like deallocating specific functions or adding new predefined imports for the jit. It is also not possible to customise the behavior of existing methods to for example allow replacing an already defined function for hot code swapping. It was also not possible to create a module with a non-static lifetime (required for headcrab-inject) In the new design Module is instead a trait with ModuleDeclarations being a struct for some shared behavior regarding how declarations are handled. As the Module is fully exposed, it is possible to add new methlds to the api of every module and customize the behavior of existing methods. None of the previously mentioned use cases are implemented yet. I will leave that for a future PR.

Also fixes #1691

view this post on Zulip Wasmtime GitHub notifications bot (Oct 08 2020 at 16:40):

pchickey submitted PR Review.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 08 2020 at 16:52):

pchickey merged PR #2249.


Last updated: Dec 23 2024 at 12:05 UTC