ballercat / minimal-webpack5-wasm-demo

Minimal Webpack 5 Raw WebAssembly Demo
33 stars 8 forks source link

Could you please add the cpp source file? #1

Closed timbergus closed 1 year ago

timbergus commented 1 year ago

Hi. I have followed your example, trying to compile my files using this command.

em++ --no-entry -lembind -s ENVIRONMENT=web $(APP)/wasm.cpp -o $(APP)/script.wasm 

I'm trying to build a simple library with many functions for a web application, but it has no use. Nothing works. I think I'm doing something wrong in configuring my CPP file. Can you please add your factorial example CPP source code to the repo? I think it could help me a lot. This is my CPP test file.

code

I really appreciate any help you can provide.

ballercat commented 1 year ago

I no longer have the original cpp file. It's a single recursive fibonacci function however so you could find one online.

Best I can do for you is this repo of mine https://github.com/ballercat/why-not-wasm which is where I originally experimented with CPP & Webpack integration via wasm. You should be able to find some example in there, it's how I built the original demo fib wasm file as far as I remember.