Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WATT version of proc_macro in cqrs-codegen crate #3

Closed
tyranron opened this issue Nov 2, 2019 · 2 comments · Fixed by #5
Closed

WATT version of proc_macro in cqrs-codegen crate #3

tyranron opened this issue Nov 2, 2019 · 2 comments · Fixed by #5
Assignees
Labels
enhancement New feature or request

Comments

@tyranron
Copy link
Member

tyranron commented Nov 2, 2019

To reduce compilation time and ensure safety via sandboxing, let's provide a watt version of our cqrs-codegen crate.

How it would work:

  1. Create a no-watt feature for cqrs-codegen crate. So, by default the compilation will use watt, but a usual compilation may be opt-in if desirable.
  2. Make all dependencies of cqrs-codegen crate optional behind no-watt feature.
  3. Create a build.rs which compiles cqrs-codegen crate into src/codegen.wasm if it's absent.
  4. Setup correct conditional compilation in src/lib.rs.
  5. Re-export no-watt feature in cqrs crate as codegen/no-watt.
  6. ...
  7. PROFIT

Let's do it right after completing #2

@tyranron tyranron added the enhancement New feature or request label Nov 2, 2019
@tyranron
Copy link
Member Author

tyranron commented Nov 2, 2019

Consider rust-lang/cargo#4881 tricks for building codegen.wasm.

@ffuugoo
Copy link

ffuugoo commented Nov 2, 2019

Seen watt announcement few weeks ago. This is rad. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants