Giter Club home page Giter Club logo

example-nspire's Introduction

A Rust and Ndless example

Prerequisites

  • Ndless toolchain installed and added to path
  • Rustup installed
  • Latest Rust Nightly installed (nightly-2020-05-31 works)
  • Unix-like (tested on Linux, most likely Mac and Cygwin will work as well)

Complete install script:

curl https://sh.rustup.rs -sSf | sh # skip if rustup already installed
rustup install nightly # skip if nightly already installed
cargo install cargo-ndless

Building

To create a debug version, run cargo +nightly ndless build. To create a production version, run cargo +nightly ndless build -- --release. Binaries will be in target/armv5te-nspire-eabi/(debug or release)/name.tns.

Warning: the output binaries will be slow and large without enabling release mode! Be sure to enable it before distributing binaries.

You may skip +nightly if you set nightly as your default compiler (rustup default nightly), or set a directory override.

Additional Binary Options

In your Cargo.toml, the following options can be added:

[package.metadata.zehn]
name = "Hello World"             # Name passed to genzehn
compress = true                  # Compress binary with genzehn
notice = "Message"               # Add notice "Message"
flags = "--240x320-support true" # Add additional flags to be passed to genzehn

These attributes can be seen when holding down the catalog key (book) when launching your application.

Additionally, the version and authors fields of your Cargo.toml are automatically added to the binary. Only the first digit of the version will be displayed, and multiple authors are joined together with a space.

Make your own app

This project is set up using Cargo workspaces, which is not ideal for single-application setups. Instead, simply copy any of the directories into its own repository and write code there. Alternatively, install cargo-generate with cargo install cargo-generate and run cargo generate --git https://github.com/lights0123/nspire-rust-template.git for a fully configured template.

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.