GithubHelp home page GithubHelp logo

nunogois / vite-vue-rust-wasm Goto Github PK

View Code? Open in Web Editor NEW
7.0 3.0 1.0 48 KB

Example showcasing a new Vite project using Vue 3 + TypeScript + Tailwind CSS + Rust + WebAssembly.

HTML 8.52% JavaScript 5.33% Vue 49.36% CSS 1.49% TypeScript 8.39% Rust 26.91%
vue composition-api typescript vite tailwindcss rust webassembly wasm rust-lang hacktoberfest

vite-vue-rust-wasm's Introduction

vite-vue-rust-wasm

Example showcasing a new Vite project using Vue 3 + TypeScript + Tailwind CSS + Rust + WebAssembly.

Check out a SvelteKit example here.

Quick Start

Prerequisites

  1. First of all, rustup if you haven't already;
  2. Update with rustup update;
  3. Install wasm-pack if you haven't already;
  4. Globally install cargo-watch with cargo install cargo-watch or cargo binstall cargo-watch;

Project

  1. Setup the project (install dependencies and build wasm): yarn setup;
  2. Run the project: yarn dev;
  3. Build the project for release: yarn build;

Dev Log

  1. Created Vite + Vue3 + TS project with npm init vite vite-vue-rust-wasm;
  2. Added Tailwind CSS as per these instructions;
  3. Created wasm package with wasm-pack new wasm;
  4. Installed vite-plugin-wasm-pack with yarn add -D vite-plugin-wasm-pack and added wasm package in vite.config.ts;
  5. Added relevant scripts to package.json;
  6. Added Vue component HelloWasm.vue with WebAssembly example;

Vue 3 + Typescript + Vite

This template should help get you started developing with Vue 3 and Typescript in Vite. The template uses Vue 3 <script setup> SFCs, check out the script setup docs to learn more.

Recommended IDE Setup

Type Support For .vue Imports in TS

Since TypeScript cannot handle type information for .vue imports, they are shimmed to be a generic Vue component type by default. In most cases this is fine if you don't really care about component prop types outside of templates. However, if you wish to get actual prop types in .vue imports (for example to get props validation when using manual h(...) calls), you can enable Volar's .vue type support plugin by running Volar: Switch TS Plugin on/off from VSCode command palette.

vite-vue-rust-wasm's People

Contributors

nunogois avatar

Stargazers

Jay C. avatar Bulbasaur.Yan avatar Jules avatar Ivan avatar John avatar Marvin Bruns avatar  avatar

Watchers

James Cloos avatar  avatar  avatar

Forkers

kali6o4

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.