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
Prequel: The original issue I had faced was wasm-pack not pulling keywords from Cargo.toml into generated package.json. This affects the visibility of the package in the registry. The solution so far is manual editing of package.json which is not ideal, imho.
Idea evolution: Why not to add support for a custom [wasm] (or [package.wasm]) section to Cargo.toml? This can be a set of key/value pairs to put into generated package.json. It can even help overriding same-name field from [package] specifically for wasm target.
💻 Basic example
[package]
name = "my-lib"# this name will be used on crates.io# package may be used as a native lib without possible confusion
[package.wasm]
name = "my-lib-wasm"# override, this name will be used on npmkeywords = ["one", "two", "three"] # original to generated package.json
What do you think?
PS: Would be happy to pick this one up 🤓
The text was updated successfully, but these errors were encountered:
barabadzhi
changed the title
Support custom section in Cargo.toml, ex. [wasm]
[feature] Support custom section in Cargo.toml, ex. [wasm]
Aug 22, 2019
💡 Feature description
Prequel: The original issue I had faced was
wasm-pack
not pullingkeywords
fromCargo.toml
into generatedpackage.json
. This affects the visibility of the package in the registry. The solution so far is manual editing ofpackage.json
which is not ideal, imho.Idea evolution: Why not to add support for a custom
[wasm]
(or[package.wasm]
) section toCargo.toml
? This can be a set of key/value pairs to put into generatedpackage.json
. It can even help overriding same-name field from[package]
specifically for wasm target.💻 Basic example
What do you think?
PS: Would be happy to pick this one up 🤓
The text was updated successfully, but these errors were encountered: