Reputation: 207
I have an existing cargo project which I would like to work with web-asm. However, wasm-pack build
fails because my project is a binary rather than a library. How can I circumvent this problem while still keeping my version control history?
Upvotes: 2
Views: 5976
Reputation: 1417
These answers may help you : https://stackoverflow.com/a/26946705/11732874
It works for a default bin package on edition 2018. You can put this in your cargo.toml
[lib]
name = "YourPackageName"
path = "src/PathToMain.rs"
How can I circumvent this problem while still keeping my version control history?
What do you mean ?
Upvotes: 3