Giter VIP home page Giter VIP logo

seed-quickstart's Introduction

Seed Quickstart

Basic Rust-only template for your new Seed app.

1. Create a new project

  1. You can use cargo generate to use this template.

    $ cargo generate --git https://github.com/seed-rs/seed-quickstart.git --name my-project
    $ cd my-project
  2. Alternatively, simply click on the green button Use this template on the GitHub profile of this quickstart.

  3. Make sure Git doesn't automatically convert your newlines to CRLF because linters don't like it.

    • Run $ git config --global core.autocrlf in your terminal and it should return input or false. See Git docs for more info.
  4. Clone your new repository to your local machine. I use GitKraken, but you are probably a better developer than me - use your favorite terminal.

2. Install / check required tools

  1. Make sure you have basic tools installed:

  2. Platform-specific tools like ssl and pkg-config:

    • Follow recommendations in build errors (during the next chapter).
    • Note: Don't hesitate to write notes or a tutorial for your platform and create a PR .

3. Prepare your project for work

  1. Open the project in your favorite IDE (I recommend VS Code + Rust Analyzer).
  2. Open a new terminal tab / window and run: cargo make serve
  3. Open a second terminal tab and run: cargo make watch
  4. If you see errors, try to fix them or write on our chat or forum.
  5. Modify files like README.md and Cargo.toml as you wish.

4. Write your website

  1. Open localhost:8000 in a browser (I recommend Firefox and Chrome).
  2. Modify source files (e.g. /src/lib.rs or /index.html).
  3. Watch compilation in the terminal tab where you run cargo make watch.
  4. You can watch dev-server responses in the tab where you run cargo make serve.
  5. Refresh your browser and see changes.
  6. Go to step 2.

5. Prepare your project for deploy

  1. Run cargo make verify in your terminal to format and lint the code.
  2. Run cargo make build_release.
  3. Upload index.html and pkg into your server's public folder.
    • Don't forget to upload also configuration files for your hosting, see the Netlify one below.
# netlify.toml
[[redirects]]
  from = "/*"
  to = "/index.html"
  status = 200

Other Seed quickstarts and projects

seed-quickstart's People

Contributors

azzamsa avatar ben-ph avatar brandondong avatar coalunicorn avatar david-oconnor avatar drmason13 avatar eopb avatar flosse avatar frozar avatar gemmaro avatar martinkavik avatar naufraghi avatar pingiun avatar tshepang avatar whazor avatar zakaluka avatar

Watchers

 avatar

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.