Emurgo / message-signing

MIT License
26 stars 16 forks source link

Building not working since no package.json in the project #5

Open xocdr opened 2 years ago

xocdr commented 2 years ago

README talks about building using npm run build:* but that is not possible since no package.json is available.

Please provide proper documentation (and while you are at it, provide proper documentation for the serialization library too).

rooooooooob commented 2 years ago

I think that part was just a mistake since we use those commands in the serialization lib. They're aliases for the standard wasm-pack build/pack commands, as it is mentioned it can be built from. The other documentation we have for this crate inside of example/rust is aimed at people using it from rust which documents basic usage as well.

It's a rust project which just provides wasm_bindgen wrappers to everything. In the meantime if you're trying to get this to work until the documentation has been updated try:

wasm-pack build --target=browser (or nodejs)
wasm-pack pack

from the rust directory which will generate a pkg directory containing the built wasm along with the javascript glue code.

I hope this helps a bit until the documentation for js usage can be changed.