Skip to content

ITC-LittlePrince/webpack-wasm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

webpack-wasm

Build Status

Webpack + HMR + Babel + WASM(Rust cdylib)

This is a fresh and up-to-date wasm-pack repository using Webpack 5 + HMR and Bebel plugin to build a classic package for WEB MDN API developers and beyond.

Overall, the official repository was supposed to be updated by the wasm-pack developers, but unfortunately now you are here. Well, like a typical American from Silicon Valley, I can add that I spent 3 days for 8 hours on this repository and it's posted absolutely for free. That's about how much time I saved for you. I'm sure this repository will serve as a foundation for many new projects, including my projects.

I'm also raising funds to create and maintain a protocol for my new ecosystem for use in WEB 4.0 networks with a decentralized node infrastructure.

Metamask wallet ETH, BNB, MATIC, AVAX: 0xAc3C75F55A51efeEa471bbB7fB4FD00Ec8FcE9e4

To quickly create a new application using npx:

npx degit ITC-LittlePrince/webpack-wasm.git my-new-app-name

Don't forget to change my-new-app-name to the name of your project.

Usage on Windows/Linux:

To run during development

npm i
npm run start-windows

or

npm i
npm run start-linux

To run during project deployment

npm i
npm run build-windows

or

npm i
npm run build-linux

Project directory structure

Directory Functional belonging
/js/ Directory for development in JavaScript
/js/bin Directory for executable files
/js/lib Directory for libraries that store interfaces and class objects
/js/static Directory for package media files
/wasm/ Directory for development in Rust
/wasm/src Directory for writing structures, interfaces, and functions using [#wasm-bindgen]

A little bit about the problems I faced when creating the repository

Note: --openssl-legacy-provider for Node >=v19. Popular error when running. Probably can be removed in the future or in earlier versions of Node.

Additional links to WASM documentation: