Giter Club home page Giter Club logo

rust-render's Introduction

Rust-template

Build Status

A project template for Rust, helping to structure your projects according to best practices.

Features

  • Suitable for both a binary or library project
  • Structured according to both Git and Rust best practices
  • Multiplatform support - The template is compatible with Linux, MacOS and Windows
  • WebAssembly support
    • Conditionally includes console_error_panic_hook improving browser error messages.
    • Conditionally includes wee_alloc for a smaller memory footprint.
    • Dedicated README_WEB.md for WebAssembly usage and building instructions
  • Continuous Integration support with Github Actions
    • Rust: Triggers the following on every push or pull request, using the latest stable toolchain:
      • cargo fmt: Ensure uniform code formatting
      • cargo clippy: Ensure idiomatic code
      • cargo check: Ensure compilation succeeds on Linux, MacOS, Windows and WebAssembly
      • cargo test: Run all tests
      • cargo bench: Run all benchmarks
    • Release: Create a new GitHub Release draft when a tag starting with v is pushed.
    • Publish: Automated publishing of binary assets for a GitHub Release:
      • Build binaries for Linux, MacOS, Windows and WebAssembly
      • Archive binaries with a license, readme and appropate files for each platform
      • Upload archives as assets for the appropriate GitHub release

Download

Available releases can be downloaded for your platform of choice on the Releases page. These are merely provided as an example on how the asset uploading works, and aren't actually useful by themselves beyond what a hello world program can provide.

Usage

To tailor the template to your specific needs, simply go over the following checklist:

  1. The template assumes a binary project by default. If you require a library project:
    1. Uncomment Cargo.lock in .gitignore.
    2. Remove src/main.rs.
    3. Remove .github/workflows/publish.yml
  2. Update Cargo.toml with the correct information for your project.
  3. Change the name inside the LICENSE file, or replace with a license of your choice.
  4. Update this README.md and README_WEB.md (do not forget to replace URLs).
  5. Update the CHANGELOG as you add to your project.

Building

If desired, you can build Rust-template yourself. You will need a working Rust and Cargo setup. Rustup is the simplest way to set this up on either Windows, Mac or Linux.

Once the prerequisites have been installed, compilation on your native platform is as simple as running the following in a terminal:

cargo build --release

WebAssembly

Rust-template supports running as WebAssembly in the browser. See the web readme for instructions.

Contribution

Found a problem or have a suggestion? Feel free to open an issue.

License

Rust-template itself is licensed under the MIT license and includes this as the default project license.

rust-render's People

Contributors

gregoryw3 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.