pd-rs / crankstart

A barely functional, wildly incomplete and basically undocumented Rust crate whose aim is to let you write Games for the Playdate handheld gaming system in Rust.
MIT License
235 stars 24 forks source link

Replace heapless with the much smaller arrayvec #70

Closed parasyte closed 1 year ago

parasyte commented 1 year ago

heapless has surprisingly a lot of dependencies, and the only thing it is used for is a stack-allocated string in the panic handler. None of these dependencies are needed.

├── crankstart v0.1.2
│   ├── anyhow v1.0.75
│   ├── crankstart-sys v0.1.2
│   ├── cstr_core v0.1.2
│   │   ├── cty v0.1.5
│   │   └── memchr v2.6.3
│   ├── euclid v0.22.9 (*)
│   ├── hashbrown v0.14.0 (*)
│   └── heapless v0.6.1
│       ├── as-slice v0.1.5
│       │   ├── generic-array v0.12.4
│       │   │   └── typenum v1.16.0
│       │   ├── generic-array v0.13.3
│       │   │   └── typenum v1.16.0
│       │   ├── generic-array v0.14.7
│       │   │   └── typenum v1.16.0
│       │   └── stable_deref_trait v1.2.0
│       ├── generic-array v0.14.7 (*)
│       ├── hash32 v0.1.1
│       │   └── byteorder v1.4.3
│       └── stable_deref_trait v1.2.0

After replacing it with arrayvec:

├── crankstart v0.1.2
│   ├── anyhow v1.0.75
│   ├── arrayvec v0.7.4
│   ├── crankstart-sys v0.1.2
│   ├── cstr_core v0.1.2
│   │   ├── cty v0.1.5
│   │   └── memchr v2.6.3
│   ├── euclid v0.22.9 (*)
│   └── hashbrown v0.14.0 (*)

Much better!

boozook commented 1 year ago

Good point! I'll just test it and merge soon. Thank you!