Skip to content

Commit

Permalink
add ComponentType/Lift/Lower derive macro for record types (bytecodea…
Browse files Browse the repository at this point in the history
…lliance#4337)

This is the first stage of implementing
bytecodealliance#4308, i.e. derive macros for
`ComponentType`, `Lift`, and `Lower` for composite types in the component model.
This stage only covers records; I expect the other composite types will follow a
similar pattern.

It borrows heavily from the work Jamey Sharp did in
bytecodealliance#4217.  Thanks for that, and
thanks to both Jamey and Alex Crichton for their excellent review feedback.
Thanks also to Brian for pairing up on the initial draft.

Signed-off-by: Joel Dice <joel.dice@fermyon.com>
  • Loading branch information
dicej authored Jun 29, 2022
1 parent eef1758 commit 22fb3ec
Show file tree
Hide file tree
Showing 14 changed files with 660 additions and 46 deletions.
10 changes: 10 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 22 additions & 0 deletions crates/component-macro/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
[package]
name = "wasmtime-component-macro"
version = "0.39.0"
authors = ["The Wasmtime Project Developers"]
description = "Macros for deriving component interface types from Rust types"
license = "Apache-2.0 WITH LLVM-exception"
repository = "https://github.com/bytecodealliance/wasmtime"
documentation = "https://docs.rs/wasmtime-component-macro/"
categories = ["wasm"]
keywords = ["webassembly", "wasm"]
edition = "2021"

[lib]
proc-macro = true

[dependencies]
proc-macro2 = "1.0"
quote = "1.0"
syn = { version = "1.0", features = ["extra-traits"] }

[badges]
maintenance = { status = "actively-developed" }
Loading

0 comments on commit 22fb3ec

Please sign in to comment.