Rename project to @wasm-tool/rust-webpack-plugin
We should rename this project to @wasm-tool/rust-webpack-plugin, to be consistent with the Rollup plugin @wasm-tool/rollup-plugin-rust (https://github.com/wasm-tool/rollup-plugin-rust).
To help the migration we should add a deprecation message to wasm-pack-plugin and indicate the path to migrate.
but this expects wasm pack right?
Yes, the plugin will still continue to use wasm-pack.
@Pauan would like to move their rust plugin for rollup in the wasm-tool org and to have consistent naming across both loaders/plugins
Wasm-pack is just an implementation detail at this point. What it really does is compile rust
I mean we can genuinely have a pure rust based plugin and compile Rust to WebAssembly right? My only (tiny) concern is that. 🙂
@sendilkumarn A plugin like that won't be very useful though, because it would only be able to send primitive types like integers and floats to/from JS.
It wouldn't be able to use JS objects, and it wouldn't be able to use any complex Rust types (such as Vec, String, &[u8], etc).
So it would be great for implementing pub extern "C" fn add(x: i32, y: i32) -> i32 { x + y } and not much else.
@Pauan Yeah definitely, my previous comment (implicitly) includes wasm-bindgen by default. Again it is only a small concern, but we have to explicitly mention that it uses wasm-pack.
@sendilkumarn As far as I can see, the only thing intrinsically tying this plugin to wasm-pack is the extraArgs option. Everything else can be abstracted away so that there's no difference between running wasm-pack and running wasm-bindgen directly.
That's what rollup-plugin-rust does: it doesn't have anything tying it to wasm-pack, so the implementation can be easily changed.
I think it's reasonable to mention wasm-pack in the README and documentation, but I don't think it's as important for it to be a part of the name, especially because wasm-pack is the official blessed way to build Rust + Wasm projects.