rust-parcel-template

Kickstart your Rust, WebAssembly, and Parcel project!

``


This template comes pre-configured with all the boilerplate for compiling Rust to WebAssembly and hooking into a Parcel build pipeline.

  • npm run start -- Serve the project locally for development at http://localhost:1234.

  • npm run build -- Bundle the project (in production mode)

Using This Template

cargo install wasm-pack
npm init rust-parcel my-app
Issues

Collection of the latest Issues

rich-murphey

rich-murphey

bug
0

Describe the Bug

Hot reloading is not working for me at least.

Steps to Reproduce

cargo install wasm-pack git clone https://github.com/rustwasm/rust-parcel-template cd rust-parcel-template npm install parcel-bundler npm run start

Then edit crate/src/lib.rs and save it multiple times.

Expected Behavior

It should hot reload after each edit.

Actual Behavior

It hot reloads once only. All succeeding edits are ignored, even though it appears to compile and bundle.

denialanderror

denialanderror

bug
6

Describe the Bug

Running the base template with the instructions in the readme, I get the following error: <path>/<to>/rust-parcel-test/node_modules/parcel-plugin-wasm.rs/wasm-loader.js:2:14: Cannot resolve dependency './rust_parcel_bg.js' at '<path>/<to>/rust-parcel-test/node_modules/parcel-plugin-wasm.rs/rust_parcel_bg.js'

I've tried this with both NPM and Yarn.

Steps to Reproduce

  1. npm init rust-parcel rust-parcel-test
  2. cd rust-parcel-test
  3. npm install
  4. npm run start
  5. See error

Expected Behavior

The app should run.

Actual Behavior

The error occurs in the build.

Additional Context

MacOS 10.14.6 Node 13.12.0

SillyFreak

SillyFreak

4

I've added the following code to lib.rs (see here):

(plus a call to foo in run()) and tried to figure out where to place helper.js, but everywhere I've tried (project root, js/, crate/, crate/src/, crate/pkg/) doesn't work. I have the feeling the file is ignored entirely; should this be working, and if so, how?

I'm on Linux and using npm run start for my tests.

Aidiakapi

Aidiakapi

1

Trying to initialize this template results in an error whilst running parcel.

Versions: wasm-pack 0.5.1 cargo 1.32.0-nightly (1fa308820 2018-10-31) rustc 1.32.0-nightly (25a42b2ce 2018-11-07) parcel 1.10.3

OS: Windows 10 Steps to reproduce:

  • npm init rust-parcel my-app
  • cd my-app
  • npm install
  • npm run start

I ran the steps in cmd, Powershell and bash, but all of them resulted in the weird, kind of cut off error message. I've also ran the equivalent yarn instructions, but this doesn't change anything, so I can with some certainty say that the problem isn't with yarn or npm.

I'm not sure which of the dependencies is the source of the error, hence I'm filing the issue against this repo.

Information - Updated May 13, 2022

Stars: 149
Forks: 15
Issues: 18

Yet Another Rust Template Engine

bytes-buf feature can produce SIGILL

Yet Another Rust Template Engine

Advent of Code Rust Template

Advent of Code Rust template from

Advent of Code Rust Template

Basic Rust-only template for your new Seed app

You can use profile of this quickstart

Basic Rust-only template for your new Seed app

Rust CLI template

A quick and dirty CLI boilerplate template for Rust

Rust CLI template

SixtyFPS Rust Template

A template for a Rust application that's using SixtyFPS for the user interface

SixtyFPS Rust Template

Rust CLI Template

Template for creating Rust-based CLI tools

Rust CLI Template

A rust github template for ease of use

Install the rust toolchain in order to have cargo installed by following

A rust github template for ease of use

Embedded Rust Template

This template is based on stm32f4xx-hal

Embedded Rust Template

serverless AWS Rust template

A sample template for bootstrapping serverless framework cli

serverless AWS Rust template

serverless AWS Rust template

A sample template for bootstrapping serverless framework cli

serverless AWS Rust template
Facebook Instagram Twitter GitHub Dribbble
Privacy