Skip to content

Commit

Permalink
fix: language
Browse files Browse the repository at this point in the history
  • Loading branch information
Bentebent committed Dec 10, 2024
1 parent 1deca0a commit 62a4fcc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion _posts/2024-12-09-proc-macro-starter.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ pub fn example() -> &'static str {
```

### Setup
Turns out there are even more steps before we can get to implementation. Because proc macros manipulate [token streams](https://doc.rust-lang.org/reference/procedural-macros.html#r-macro.proc.proc_macro.token-stream) they need to be deployed as a separate crate that is compiled before any downstream crate. Because of this proc macro crates also cannot export anything but macros. Because our macro depends on the struct `DeprecatedResponder` we actually need two crates to make this work. This is the workspace setup I used for this.
Turns out there are even more steps before we can get to implementation. Because proc macros manipulate [token streams](https://doc.rust-lang.org/reference/procedural-macros.html#r-macro.proc.proc_macro.token-stream) they need to be deployed as a separate crate that is compiled before any downstream crate. This also means proc macro crates also cannot export anything but macros. Because our macro depends on the struct `DeprecatedResponder` we actually need two crates to make this work. This is the workspace setup I used for this.

```
├───.git
Expand Down

0 comments on commit 62a4fcc

Please sign in to comment.