Skip to content

pkg/export.js not created by wasm-pack #64

Closed
@blucia0a

Description

I followed your helloworld tutorial to get started with Rust + wasm. It mostly worked, but I noticed that wasm-pack doesn't create pkg/exports.js as you suggest it will. Instead, it created pkg/<name_of_project>.js, which contained export default init; at the end. I imported this file's init instead of wasmInit and everything worked. I'm not sure if this was because of some deviation in what I did, or if wasm-pack has changed its output.

I'm using: wasm-pack 0.8.1

and my Cargo.toml:

[package]                                                                      
name = "wasm-by-example"
version = "0.1.0"                                                              
authors = ["Brandon Lucia <blucia@gmail.com>"]                                 
edition = "2018" 
                                                                                                                                             
[lib]                                                                          
crate-type = ["cdylib"]   
                                                                                                                                    
[dependencies]                                                                 
wasm-bindgen = "0.2"

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions