Skip to content

chore: remove the wasm_plugin re-export - #16

Merged
dsherret merged 1 commit into
mainfrom
remove-wasm-plugin-reexport
Oct 21, 2026
Merged

dsherret merged 1 commit into
mainfrom
remove-wasm-plugin-reexport

Conversation

@dsherret

Copy link
Copy Markdown
Member

Removes pub use wasm_plugin::*; from src/lib.rs.

Since dprint-core 0.71.1, generate_plugin_code! puts the functions it generates inside const _: () = { ... }, so the re-export has nothing to re-export, and cargo check --target wasm32-unknown-unknown --features wasm warns that it's unused once Cargo.lock moves to 0.71.1. It isn't needed with older dprint-core versions either: the exports are #[no_mangle], which rustc exports from the cdylib even when they're in a private module.

cargo check --target wasm32-unknown-unknown --features wasm passes with no warnings. I also built the release wasm of dprint-plugin-cedar (dprint-core 0.71.0) and dprint-plugin-typescript (0.62.1, the oldest in the org) with and without the re-export, and their exports were identical.

@dsherret
dsherret merged commit 905d69b into main Oct 21, 2026
2 checks passed
@dsherret
dsherret deleted the remove-wasm-plugin-reexport branch October 21, 2026 02:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant