You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Not entirely sure of the schematics of how this would work with nx, or if this would even be considered in the scope of this project. But, I'm more so bringing it up as I'm curious.
As this may be a really cool thing to have as an nx library, as then it could export typescript from a barrel file to be used in a frontend application.
Any who, let me know what you think c:
The text was updated successfully, but these errors were encountered:
Sorry for taking so long to update this issue! As of #15 you can build a wasm library by adding the target option to your project.json's build target and the crate-type to your Cargo manifest:
To be usable in a TypeScript project, you would also want to do some other stuff, like run wasm-bindgen after the build and update your tsconfig.json to add a path alias for the build output directory.
This is honestly not a huge priority for me, but nowadays Nx makes it pretty straightforward to do this kind of thing with custom local executors, so it would be fairly straightforward to write one that first runs the @nxrs/cargo:build executor and then runs wasm-bindgen on the build output. It would be cool to have this feature built in to the plugin someday, so I'll leave this open in the meantime. :)
https://rustwasm.github.io/book/introduction.html
Not entirely sure of the schematics of how this would work with nx, or if this would even be considered in the scope of this project. But, I'm more so bringing it up as I'm curious.
As this may be a really cool thing to have as an nx library, as then it could export
typescript
from a barrel file to be used in a frontend application.Any who, let me know what you think c:
The text was updated successfully, but these errors were encountered: