Skip to content

Conversation

@yurydelendik
Copy link
Contributor

As being part of CompilationArtifacts, it will be nice to make Module and ModuleLocal serializable.

Changes:

  • Defines WasmTime and WasmFuncType in the Cranelift, instead of re-exporting from wasmparser (also removes un-need cases in wasmtime crate)
  • Adds serde attributes to cranelift_wasm types (that need them)
  • Adds logic for serializing Module::id and Module::passive_data

@github-actions github-actions bot added cranelift Issues related to the Cranelift code generator cranelift:wasm wasmtime:api Related to the API of the `wasmtime` crate itself labels Jul 9, 2020
@github-actions
Copy link

github-actions bot commented Jul 9, 2020

Subscribe to Label Action

cc @bnjbvr, @peterhuene

This issue or pull request has been labeled: "cranelift", "cranelift:wasm", "wasmtime:api"

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

  • bnjbvr: cranelift
  • peterhuene: wasmtime:api

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

Learn more.

#[cfg_attr(feature = "enable-serde", derive(Serialize, Deserialize))]
pub struct WasmFuncType {
/// Function params types.
pub params: Box<[WasmType]>,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not really something for this PR, but I kind of wish we had a wasm-types crate or something that our whole crate graph could depend on, so that we weren't converting back and forth between identical types all the time.

@yurydelendik yurydelendik merged commit b2551bb into bytecodealliance:main Jul 10, 2020
@yurydelendik yurydelendik deleted the serialize-module branch July 10, 2020 20:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cranelift:wasm cranelift Issues related to the Cranelift code generator wasmtime:api Related to the API of the `wasmtime` crate itself

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants