Comments (2)
TLDR: I can bring the size of the release binary down to ~3.4 MiB by running strip, and following the advice in https://github.com/johnthagen/min-sized-rust.
Without doing anything, a release build weighs in at 4.6 MiB:
cargo bloat --release --crates --split-std -n 20
Compiling ...
Analyzing target/release/grimoire
File .text Size Name
6.7% 11.6% 318.1KiB clap
6.6% 11.4% 312.7KiB core
5.6% 9.6% 265.6KiB image
4.8% 8.3% 229.2KiB regex_syntax
4.6% 8.0% 220.3KiB regex
4.4% 7.7% 210.8KiB alloc
3.8% 6.5% 179.7KiB grimoire
3.8% 6.5% 178.2KiB std
3.7% 6.3% 174.1KiB toml
1.9% 3.3% 90.1KiB notify
1.7% 2.9% 79.0KiB serde
1.4% 2.4% 65.2KiB jpeg_decoder
1.3% 2.3% 62.0KiB inflate
0.8% 1.4% 39.9KiB gleam
0.7% 1.3% 34.6KiB scoped_threadpool
0.7% 1.2% 32.2KiB [Unknown]
0.7% 1.1% 31.5KiB env_logger
0.6% 1.0% 27.7KiB png
0.4% 0.7% 19.2KiB rustc_demangle
0.4% 0.7% 18.8KiB rayon_core
58.0% 100.0% 2.7MiB .text section size, the file size is 4.6MiB
After running strip, 3.8 MiB:
~/code/grimoire 15s
❯ strip target/release/grimoire
~/code/grimoire
❯ ls -lh target/release/grimoire
-rwxr-xr-x 1 justin staff 3.8M Mar 31 20:02 target/release/grimoire
Following the suggestions in https://github.com/johnthagen/min-sized-rust, I can bring the size down to ~3.4 MiB.
from grimoire-legacy.
Random thought: could we somehow use grimoire to emit an artifact that contains the exact set of GL calls + shader code required to render? code generation seems scary and out of scope for this project, but I highly doubt that we'll ever be able to shrink grimoire down to a suitable size for a 64k entry.
from grimoire-legacy.
Related Issues (20)
- add command-line option to position window HOT 3
- consider adding [an option to] print a message at the start of each recompile. HOT 4
- Consider renaming the "audio" resource to "sound" HOT 2
- Consider adding support for geometry shaders
- Document using the F{1,2,3,4} keys for playing, pausing, stepping, and restarting playback
- Make SRGB framebuffer configurable
- Support clearing only the depth buffer
- Support drawing a pass multiple times HOT 1
- --fps option has no effect HOT 3
- add boolean preprocessor symbol GRIMOIRE or similar HOT 6
- Document latest features HOT 1
- Support specifying preprocessor #defines in the pass configuration
- Build and run on the NVIDIA Jetson Nano
- Consider writing a rendy or wgpu-rs backend
- Support image recording
- consider reading JSON from shadertoy shader 'download'. HOT 1
- Add support for instanced rendering OBJ models HOT 1
- Add support for compute shaders
- video example no longer runs
- shadertoy-microphone example looks wrong
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from grimoire-legacy.