• Stars
    star
    200
  • Rank 195,325 (Top 4 %)
  • Language
    Rust
  • License
    Apache License 2.0
  • Created about 6 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Check your crate for (possible) no_std compatibility

cargo nono - Detect (possible) no_std compatibility of your crate and dependencies

Motivation

From embedded programming, over smart contracts in Rust, to general cross-platform portable crates, #![no_std] crates are becoming more and more widespread. However it is currently a very cumbersome process to find out if and why (not) a crate is compatible with no_std usage, and often requires a lengthy trial and error process, and digging through the source of all your dependencies.

cargo nono tries to aid you in navigating the current minefield that is no_std usage, and it's biggest "no no"s.

Installation

Prebuilt binaries

cargo-nono also comes as prebuilt binaries (useful for CI):

curl -LSfs https://japaric.github.io/trust/install.sh | \
    sh -s -- --git hobofan/cargo-nono

From crates.io

cargo install cargo-nono
# For warnings with more informative messages install like this
RUSTFLAGS="--cfg procmacro2_semver_exempt" cargo install cargo-nono

Demo

asciicast

Usage

Run in the crate directory you want to check:

cargo nono check

The cargo nono check subcommand also understands the --no-default-features and --features <FEATURES> flags to help in conditional no_std setups.

Features

  • Tries to infer no_std compatibility in dependencies by looking for a #![no_std] attribute or the often used conditional #![cfg_attr(not(feature = "std"), no_std)]
  • Helps in pinpointing which dependencies and feature flags activate std feature flags
  • Warn of use std:: statements in code

Planned features

  • Warn of [build-dependencies] features bleeding over: cargo#5730

License

Licensed under either of

at your option.

More Repositories

1

ambassador

Delegation of trait implementations via procedural macros
Rust
250
star
2

collected-robotic-arms

Collection of Robotic Arms and related resources
Shell
100
star
3

yew-react-example

This project shows how to create a web app using a React component inside a Yew component.
JavaScript
56
star
4

reacty_yew

Generate Yew components from React components via Typescript type definitions
JavaScript
53
star
5

rust-interop

Website to highlight Rust language interop options
TypeScript
24
star
6

rsdocs-dashing

Tool to generate docsets (Dash/Zeal/etc.) for Rust crates
Rust
16
star
7

smiles-parser

nom-based SMILES parser for Rust based on OpenSMILES
Rust
9
star
8

margo

Modular reimplementation of Cargo (Rust package manager)
Rust
8
star
9

tippytap

Rust library to help write Tip tooltips
Rust
8
star
10

dredd-hooks-rust

Dredd HTTP API testing integration for Rust
Rust
7
star
11

ronat

Rust linter for documentation
Rust
7
star
12

yew_webview_bridge

2-way communication between yew and web-view
Rust
5
star
13

shell-dotenv

.env sourcing for the shell
Shell
4
star
14

lfs-unload

Utility to remove local copies of git-lfs files
Rust
4
star
15

signal-peptide-pred

[WIP] Signal peptide prediction based on the SignalP 5.0 paper
Python
4
star
16

ucsf-nmr

Rust parser for the UCSF NMR file format
Rust
3
star
17

jnigen

Generate Java native libraries via Rust proc_macro
Rust
3
star
18

feldhelden

JavaScript
2
star
19

stdweb_logger

Crude logger implementation for use with stdweb
Rust
1
star
20

config

my config files
Vim Script
1
star
21

rust-ghcn-daily

Parser for GHCN-Daily `*.dly` files.
Rust
1
star
22

bzlmod-version

TypeScript
1
star
23

rlay-version-filter-plugin

Rust
1
star