Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

why i add a compress function but got Webassembly Link Error in browser #1

Open
Ezrealzbb opened this issue May 17, 2020 · 0 comments

Comments

@Ezrealzbb
Copy link

image

  1. i add the compress2 in your zlib-sample.c
    image

  2. run npm run build to compile to wasm file

  3. write code and run dev server with webpack

import wasm from "./zlib-sample.wasm"  //  wasm is a base64 string
import { Buffer } from 'buffer';
const gzip = await initialize(Buffer.from(wasm, 'base64'));// initialize is your example function copy in src/index.js

in chrome browser, i got error like this
image

can u help me figure out what's reason, very thanks

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

No branches or pull requests

1 participant