• Stars
    star
    127
  • Rank 282,790 (Top 6 %)
  • Language
    Rust
  • License
    BSD 2-Clause "Sim...
  • Created over 2 years ago
  • Updated over 2 years ago

Reviews

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

Repository Details

Please do not use this.

auto-import

The auto_import::magic!{} macro expands to whatever use statements you need to make the rest of the code compile.

https://twitter.com/m_ou_se/status/1527209443309633536

Please do not use this.

Example

auto_import::magic!();

fn main() {
    let _ = BTreeMap::<File, PathBuf>::new();
    let _ = i32::from_str("123");
    std::io::stdout().write_all(b"!\n").unwrap();
}
$ cargo run
   Compiling auto-import v0.1.0
   Compiling example v0.1.0
   Injecting use std::collections::BTreeMap;
   Injecting use std::fs::File;
   Injecting use std::path::PathBuf;
   Injecting use std::str::FromStr;
   Injecting use std::io::Write;
    Finished dev [unoptimized + debuginfo] target(s) in 0.60s
     Running `target/debug/example`
!

More Repositories

1

rust-atomics-and-locks

Code examples, data structures, and links from my book, Rust Atomics and Locks.
Rust
1,251
star
2

nightly-crimes

Please do not use this.
Rust
169
star
3

pong

Fake ping times.
Rust
144
star
4

floatconv

Fast implementations of integer/floating point conversion operations.
Rust
130
star
5

atomic-wait

Cross-platform atomic wait and wake (aka futex) functionality for Rust.
Rust
102
star
6

whichever-compiles

Rust
93
star
7

linux-futex

Rust interface for Linux futexes, the fast user-space locking primitive.
Rust
83
star
8

config

The one and only perfect configuration for Vim, Zsh, Bash, Git, etc.
Shell
38
star
9

spez

Rust macro to specialize on the type of an expression.
Rust
35
star
10

bootlib

A minimalistic library to help making your x86 assembly program bootable.
Assembly
25
star
11

git-prompt-path

Display git information next to every path component in your prompt.
Shell
24
star
12

teck-programmer

Programmer for TECK keyboards.
JavaScript
22
star
13

units

Compile time unit checking with C++11 template magic.
C++
13
star
14

reedition

Rust
11
star
15

picp

A PIC16F145x based PIC16F145x USB programmer.
C++
11
star
16

rust-horrible-katex-hack

Rust
10
star
17

moggle

A C++11 OpenGL library.
C++
9
star
18

single-use-dns

Rust
9
star
19

bebop-rust

Rust
7
star
20

tek

Truly Ergonomic Keyoard Firmware Upgrade Tool
C++
7
star
21

futex-lock-experiment

Rust
6
star
22

r6502

6502 processor emulator written in Rust
Rust
4
star
23

blog

My blog. https://blog.m-ou.se/
4
star
24

cpp-experiments

Some crazy C++ experiments
C++
2
star
25

ryu-rust

Fast floating point to decimal string conversion, using the Ryu algorithm.
2
star
26

cratesync

Rust
2
star
27

raw-string-rs

Small Rust library providing RawStr and RawString.
Rust
1
star
28

scrabble-bf

Brute-force tool to find the highest-scoring word in Scrabble/Wordfeud.
C++
1
star
29

x86502

A bootable 6502 emulator for x86.
Assembly
1
star
30

moggled

Moggle for D
D
1
star
31

serial

A cross-platform serial port library.
C++
1
star
32

tis100node

Rust
1
star
33

klondike

Rust
1
star
34

ninj

Rust
1
star