Rust generate very large rlib file

Somehow rust generate a very large rlib
project locate here

yuyang@yuyang-virtual-machine:~/tracing/target/debug$ ls -lh 
total 1,4G
drwxrwxr-x 42 yuyang yuyang 4,0K  9-р сар  8 14:43 build
drwxrwxr-x  2 yuyang yuyang  60K  9-р сар  8 14:47 deps
drwxrwxr-x  2 yuyang yuyang 4,0K  9-р сар  8 14:43 examples
drwxrwxr-x  5 yuyang yuyang 4,0K  9-р сар  8 14:46 incremental
-rw-rw-r--  1 yuyang yuyang  281  9-р сар  8 14:43 libcommon_tracing.d
-rw-rw-r--  2 yuyang yuyang 1,4G  9-р сар  8 14:47 libcommon_tracing.rlib

It there a tool to analyzer why this rlib is so big.

Could you run ar x libcommon_tracing.rlib to unpack the rlib archive and then show the size of lib.rmeta and all files with the .rcgu.o extension?

I see A lot of .o files.

-rw-rw-r--  1 yuyang yuyang 1,4G  9-р сар  8 14:47 libcommon_tracing.rlib
-rw-r--r--  1 yuyang yuyang 192M  9-р сар  8 15:03 common_tracing-e4da751058b67ca8.3yns4yyxjfwy0s47.rcgu.o
-rw-r--r--  1 yuyang yuyang 176M  9-р сар  8 15:03 common_tracing-e4da751058b67ca8.5d12axqg6h3lpdf3.rcgu.o
-rw-r--r--  1 yuyang yuyang 166M  9-р сар  8 15:03 common_tracing-e4da751058b67ca8.2poess0ls2p72u76.rcgu.o
-rw-r--r--  1 yuyang yuyang 111M  9-р сар  8 15:03 common_tracing-e4da751058b67ca8.272415lntdck4ph.rcgu.o
-rw-r--r--  1 yuyang yuyang  72M  9-р сар  8 15:03 common_tracing-e4da751058b67ca8.2kk0lp3hggewujx1.rcgu.o
-rw-r--r--  1 yuyang yuyang  63M  9-р сар  8 15:03 common_tracing-e4da751058b67ca8.k5d0h8oyb8x9sud.rcgu.o
-rw-r--r--  1 yuyang yuyang  57M  9-р сар  8 15:03 common_tracing-e4da751058b67ca8.134tn7dc3pfvdt43.rcgu.o
-rw-r--r--  1 yuyang yuyang  55M  9-р сар  8 15:03 common_tracing-e4da751058b67ca8.51m86omks9xg0qy5.rcgu.o
-rw-r--r--  1 yuyang yuyang  52M  9-р сар  8 15:03 common_tracing-e4da751058b67ca8.31yygtkl2j0oke.rcgu.o
-rw-r--r--  1 yuyang yuyang  36M  9-р сар  8 15:03 common_tracing-e4da751058b67ca8.sd0ashnu4v05p63.rcgu.o
-rw-r--r--  1 yuyang yuyang  36M  9-р сар  8 15:03 common_tracing-e4da751058b67ca8.1qykg1k7i7zkr1cv.rcgu.o
-rw-r--r--  1 yuyang yuyang  33M  9-р сар  8 15:03 common_tracing-e4da751058b67ca8.28h226sc41xm8msw.rcgu.o
-rw-r--r--  1 yuyang yuyang  32M  9-р сар  8 15:03 common_tracing-e4da751058b67ca8.350tjqj29alz51tw.rcgu.o
-rw-r--r--  1 yuyang yuyang  31M  9-р сар  8 15:03 common_tracing-e4da751058b67ca8.3ie2ykrogqkt90dw.rcgu.o
-rw-r--r--  1 yuyang yuyang  30M  9-р сар  8 15:03 common_tracing-e4da751058b67ca8.1ledvvjiyx5hmhpu.rcgu.o
-rw-r--r--  1 yuyang yuyang  25M  9-р сар  8 15:03 common_tracing-e4da751058b67ca8.jfldvlml1g25cwu.rcgu.o
-rw-r--r--  1 yuyang yuyang  22M  9-р сар  8 15:03 common_tracing-e4da751058b67ca8.2b65si4nte3s7xv8.rcgu.o
-rw-r--r--  1 yuyang yuyang  22M  9-р сар  8 15:03 common_tracing-e4da751058b67ca8.2cn27fswak39up3t.rcgu.o
-rw-r--r--  1 yuyang yuyang  20M  9-р сар  8 15:03 common_tracing-e4da751058b67ca8.448zew0lv899x6jm.rcgu.o
-rw-r--r--  1 yuyang yuyang  17M  9-р сар  8 15:03 common_tracing-e4da751058b67ca8.1qkgebhlt0jnssdg.rcgu.o
-rw-r--r--  1 yuyang yuyang  15M  9-р сар  8 15:03 common_tracing-e4da751058b67ca8.1wwnx4p26m31mszl.rcgu.o
-rw-r--r--  1 yuyang yuyang  14M  9-р сар  8 15:03 common_tracing-e4da751058b67ca8.4wphgxsuq9nvzbjq.rcgu.o
-rw-r--r--  1 yuyang yuyang  14M  9-р сар  8 15:03 common_tracing-e4da751058b67ca8.56zn4bnhps7k0dva.rcgu.o
-rw-r--r--  1 yuyang yuyang  12M  9-р сар  8 15:03 common_tracing-e4da751058b67ca8.46kb8vjw05n0fwn8.rcgu.o
-rw-r--r--  1 yuyang yuyang 8,7M  9-р сар  8 15:03 common_tracing-e4da751058b67ca8.3i114kwutqnrpiu.rcgu.o
-rw-r--r--  1 yuyang yuyang 8,1M  9-р сар  8 15:03 common_tracing-e4da751058b67ca8.14b6494aek5lrwlk.rcgu.o
-rw-r--r--  1 yuyang yuyang 7,1M  9-р сар  8 15:03 common_tracing-e4da751058b67ca8.a8b2137v4rxovv8.rcgu.o
-rw-r--r--  1 yuyang yuyang 6,6M  9-р сар  8 15:03 common_tracing-e4da751058b67ca8.19vofn7iqj9ug1el.rcgu.o
-rw-r--r--  1 yuyang yuyang 6,6M  9-р сар  8 15:03 common_tracing-e4da751058b67ca8.3mgqkz59yup2g8t7.rcgu.o
-rw-r--r--  1 yuyang yuyang 5,8M  9-р сар  8 15:03 common_tracing-e4da751058b67ca8.31hdwgltmwdokjg4.rcgu.o
-rw-r--r--  1 yuyang yuyang 5,6M  9-р сар  8 15:03 common_tracing-e4da751058b67ca8.4pfdra0x2w00e6yp.rcgu.o
-rw-r--r--  1 yuyang yuyang 5,6M  9-р сар  8 15:03 common_tracing-e4da751058b67ca8.1ndu88i6hep4qvcz.rcgu.o
-rw-r--r--  1 yuyang yuyang 5,5M  9-р сар  8 15:03 common_tracing-e4da751058b67ca8.4dc1yr98n15wpmmi.rcgu.o
-rw-r--r--  1 yuyang yuyang 5,2M  9-р сар  8 15:03 common_tracing-e4da751058b67ca8.4h2iukqf3r0iokaa.rcgu.o
-rw-r--r--  1 yuyang yuyang 4,0M  9-р сар  8 15:03 common_tracing-e4da751058b67ca8.45lncdcv1lpt34z1.rcgu.o
-rw-r--r--  1 yuyang yuyang 3,2M  9-р сар  8 15:03 common_tracing-e4da751058b67ca8.3vfwal1umhtxj92s.rcgu.o
-rw-r--r--  1 yuyang yuyang 1,6M  9-р сар  8 15:03 common_tracing-e4da751058b67ca8.dork9kxqh6b2wcl.rcgu.o
-rw-r--r--  1 yuyang yuyang 1,3M  9-р сар  8 15:03 common_tracing-e4da751058b67ca8.2obu4ro4zleai0q7.rcgu.o
-rw-r--r--  1 yuyang yuyang 1,1M  9-р сар  8 15:03 common_tracing-e4da751058b67ca8.3m5lwhvq0jwof923.rcgu.o
-rw-r--r--  1 yuyang yuyang 710K  9-р сар  8 15:03 common_tracing-e4da751058b67ca8.3p97fj8t680loq9q.rcgu.o
-rw-r--r--  1 yuyang yuyang 656K  9-р сар  8 15:03 common_tracing-e4da751058b67ca8.5eb1wen3i6o4rlhp.rcgu.o
-rw-r--r--  1 yuyang yuyang 491K  9-р сар  8 15:03 common_tracing-e4da751058b67ca8.3fdoj6e1j50mjo5t.rcgu.o
-rw-r--r--  1 yuyang yuyang 382K  9-р сар  8 15:03 common_tracing-e4da751058b67ca8.3hfb5smsb5o3ptnd.rcgu.o
-rw-r--r--  1 yuyang yuyang 346K  9-р сар  8 15:03 common_tracing-e4da751058b67ca8.25i8lt29fn66wxr3.rcgu.o
-rw-r--r--  1 yuyang yuyang 330K  9-р сар  8 15:03 common_tracing-e4da751058b67ca8.sd8anlsqrrih9yz.rcgu.o
-rw-r--r--  1 yuyang yuyang 327K  9-р сар  8 15:03 common_tracing-e4da751058b67ca8.w1f3dlug320pay9.rcgu.o
-rw-r--r--  1 yuyang yuyang 314K  9-р сар  8 15:03 common_tracing-e4da751058b67ca8.345fmw1lhttlyi0r.rcgu.o
-rw-r--r--  1 yuyang yuyang 222K  9-р сар  8 15:03 common_tracing-e4da751058b67ca8.2yzbht27cpbtovlz.rcgu.o
-rw-r--r--  1 yuyang yuyang 215K  9-р сар  8 15:03 common_tracing-e4da751058b67ca8.3hsnxh25skw8avfz.rcgu.o
-rw-r--r--  1 yuyang yuyang 189K  9-р сар  8 15:03 lib.rmeta
-rw-r--r--  1 yuyang yuyang 183K  9-р сар  8 15:03 common_tracing-e4da751058b67ca8.19dgzkxrlhsnl0

can you reproduce this on your machine?? @bjorn3

Didn't check yet. I'm not currently near a computer.

If you are using nightly could you use cargo rustc -- -Zhuman-readable-cgu-names=1 and then unpack the rlib again. That should replace the hashes in the file names with the module path they represent.

yuyang@yuyang-virtual-machine:~/tracing_too_large/target/debug$ ls -lSh
total 2,7G
-rw-rw-r--  2 yuyang yuyang 1,4G  9-р сар  8 16:15 libcommon_tracing.rlib
-rw-r--r--  1 yuyang yuyang 192M  9-р сар  8 16:15 common_tracing-e4da751058b67ca8.core.86a0b28351a3db1d-in-common_tracing.86a0b28351a3db1d-option.volatile.rcgu.o
-rw-r--r--  1 yuyang yuyang 176M  9-р сар  8 16:15 common_tracing-e4da751058b67ca8.common_tracing.86a0b28351a3db1d-fallback.cgu.rcgu.o
-rw-r--r--  1 yuyang yuyang 166M  9-р сар  8 16:15 common_tracing-e4da751058b67ca8.tracing_subscriber.86a0b28351a3db1d-in-common_tracing.86a0b28351a3db1d-layer-layered.volatile.rcgu.o
-rw-r--r--  1 yuyang yuyang 111M  9-р сар  8 16:15 common_tracing-e4da751058b67ca8.alloc.86a0b28351a3db1d-in-common_tracing.86a0b28351a3db1d-sync.volatile.rcgu.o
-rw-r--r--  1 yuyang yuyang  72M  9-р сар  8 16:15 common_tracing-e4da751058b67ca8.sentry_tracing.86a0b28351a3db1d-in-common_tracing.86a0b28351a3db1d-layer.volatile.rcgu.o
-rw-r--r--  1 yuyang yuyang  63M  9-р сар  8 16:15 common_tracing-e4da751058b67ca8.tracing_subscriber.86a0b28351a3db1d-in-common_tracing.86a0b28351a3db1d-filter-layer_filters.volatile.rcgu.o
-rw-r--r--  1 yuyang yuyang  57M  9-р сар  8 16:15 common_tracing-e4da751058b67ca8.std.86a0b28351a3db1d-in-common_tracing.86a0b28351a3db1d-thread-local.volatile.rcgu.o
-rw-r--r--  1 yuyang yuyang  55M  9-р сар  8 16:15 common_tracing-e4da751058b67ca8.sentry_core.86a0b28351a3db1d-in-common_tracing.86a0b28351a3db1d-hub.volatile.rcgu.o
-rw-r--r--  1 yuyang yuyang  52M  9-р сар  8 16:15 common_tracing-e4da751058b67ca8.sentry_core.86a0b28351a3db1d-in-common_tracing.86a0b28351a3db1d-hub_impl.volatile.rcgu.o
-rw-r--r--  1 yuyang yuyang  36M  9-р сар  8 16:15 common_tracing-e4da751058b67ca8.tracing_subscriber.86a0b28351a3db1d-in-common_tracing.86a0b28351a3db1d-registry.volatile.rcgu.o
-rw-r--r--  1 yuyang yuyang  36M  9-р сар  8 16:15 common_tracing-e4da751058b67ca8.tracing_core.86a0b28351a3db1d-in-common_tracing.86a0b28351a3db1d-dispatcher.volatile.rcgu.o
-rw-r--r--  1 yuyang yuyang  33M  9-р сар  8 16:15 common_tracing-e4da751058b67ca8.core.86a0b28351a3db1d-in-common_tracing.86a0b28351a3db1d-any.volatile.rcgu.o
-rw-r--r--  1 yuyang yuyang  32M  9-р сар  8 16:15 common_tracing-e4da751058b67ca8.tracing_subscriber.86a0b28351a3db1d-in-common_tracing.86a0b28351a3db1d-layer-context.volatile.rcgu.o
-rw-r--r--  1 yuyang yuyang  31M  9-р сар  8 16:15 common_tracing-e4da751058b67ca8.tracing_subscriber.86a0b28351a3db1d-in-common_tracing.86a0b28351a3db1d-layer.volatile.rcgu.o
-rw-r--r--  1 yuyang yuyang  30M  9-р сар  8 16:15 common_tracing-e4da751058b67ca8.smallvec.86a0b28351a3db1d-in-common_tracing.86a0b28351a3db1d.volatile.rcgu.o
-rw-r--r--  1 yuyang yuyang  25M  9-р сар  8 16:15 common_tracing-e4da751058b67ca8.tracing.86a0b28351a3db1d-in-common_tracing.86a0b28351a3db1d-subscriber.volatile.rcgu.o
-rw-r--r--  1 yuyang yuyang  22M  9-р сар  8 16:15 common_tracing-e4da751058b67ca8.tracing_subscriber.86a0b28351a3db1d-in-common_tracing.86a0b28351a3db1d-fmt-fmt_layer.volatile.rcgu.o
-rw-r--r--  1 yuyang yuyang  22M  9-р сар  8 16:15 common_tracing-e4da751058b67ca8.common_tracing.86a0b28351a3db1d-logging.rcgu.o
-rw-r--r--  1 yuyang yuyang  20M  9-р сар  8 16:15 common_tracing-e4da751058b67ca8.alloc.86a0b28351a3db1d-in-common_tracing.86a0b28351a3db1d-boxed.volatile.rcgu.o
-rw-r--r--  1 yuyang yuyang  17M  9-р сар  8 16:15 common_tracing-e4da751058b67ca8.core.86a0b28351a3db1d-in-common_tracing.86a0b28351a3db1d-iter-adapters-filter_map.volatile.rcgu.o
-rw-r--r--  1 yuyang yuyang  15M  9-р сар  8 16:15 common_tracing-e4da751058b67ca8.core.86a0b28351a3db1d-in-common_tracing.86a0b28351a3db1d-iter-adapters-rev.volatile.rcgu.o
-rw-r--r--  1 yuyang yuyang  14M  9-р сар  8 16:15 common_tracing-e4da751058b67ca8.sentry_core.86a0b28351a3db1d-in-common_tracing.86a0b28351a3db1d-api.volatile.rcgu.o
-rw-r--r--  1 yuyang yuyang  14M  9-р сар  8 16:15 common_tracing-e4da751058b67ca8.sentry_tracing.86a0b28351a3db1d-in-common_tracing.86a0b28351a3db1d-converters.volatile.rcgu.o
-rw-r--r--  1 yuyang yuyang  12M  9-р сар  8 16:15 common_tracing-e4da751058b67ca8.core.86a0b28351a3db1d-in-common_tracing.86a0b28351a3db1d-slice-iter.volatile.rcgu.o
-rw-r--r--  1 yuyang yuyang 8,7M  9-р сар  8 16:15 common_tracing-e4da751058b67ca8.tracing_subscriber.86a0b28351a3db1d-in-common_tracing.86a0b28351a3db1d-filter-env.volatile.rcgu.o
-rw-r--r--  1 yuyang yuyang 8,1M  9-р сар  8 16:15 common_tracing-e4da751058b67ca8.common_tracing.86a0b28351a3db1d-logging.volatile.rcgu.o
-rw-r--r--  1 yuyang yuyang 7,1M  9-р сар  8 16:15 common_tracing-e4da751058b67ca8.core.86a0b28351a3db1d-in-common_tracing.86a0b28351a3db1d-iter-traits-iterator.volatile.rcgu.o
-rw-r--r--  1 yuyang yuyang 6,6M  9-р сар  8 16:15 common_tracing-e4da751058b67ca8.alloc.86a0b28351a3db1d-in-common_tracing.86a0b28351a3db1d-vec.volatile.rcgu.o
-rw-r--r--  1 yuyang yuyang 6,6M  9-р сар  8 16:15 common_tracing-e4da751058b67ca8.alloc.86a0b28351a3db1d-in-common_tracing.86a0b28351a3db1d-raw_vec.volatile.rcgu.o
-rw-r--r--  1 yuyang yuyang 5,8M  9-р сар  8 16:15 common_tracing-e4da751058b67ca8.core.86a0b28351a3db1d-in-common_tracing.86a0b28351a3db1d-mem.volatile.rcgu.o
-rw-r--r--  1 yuyang yuyang 5,6M  9-р сар  8 16:15 common_tracing-e4da751058b67ca8.core.86a0b28351a3db1d-in-common_tracing.86a0b28351a3db1d-ops-control_flow.volatile.rcgu.o
-rw-r--r--  1 yuyang yuyang 5,6M  9-р сар  8 16:15 common_tracing-e4da751058b67ca8.core.86a0b28351a3db1d-in-common_tracing.86a0b28351a3db1d-ptr-non_null.volatile.rcgu.o
-rw-r--r--  1 yuyang yuyang 5,5M  9-р сар  8 16:15 common_tracing-e4da751058b67ca8.tracing_opentelemetry.86a0b28351a3db1d-in-common_tracing.86a0b28351a3db1d-layer.volatile.rcgu.o
-rw-r--r--  1 yuyang yuyang 5,2M  9-р сар  8 16:15 common_tracing-e4da751058b67ca8.core.86a0b28351a3db1d-in-common_tracing.86a0b28351a3db1d-slice-raw.volatile.rcgu.o
-rw-r--r--  1 yuyang yuyang 4,0M  9-р сар  8 16:15 common_tracing-e4da751058b67ca8.core.86a0b28351a3db1d-in-common_tracing.86a0b28351a3db1d-ptr.volatile.rcgu.o
-rw-r--r--  1 yuyang yuyang 3,2M  9-р сар  8 16:15 common_tracing-e4da751058b67ca8.core.86a0b28351a3db1d-in-common_tracing.86a0b28351a3db1d-ops-range.volatile.rcgu.o
-rw-r--r--  1 yuyang yuyang 1,6M  9-р сар  8 16:15 common_tracing-e4da751058b67ca8.tracing_core.86a0b28351a3db1d-in-common_tracing.86a0b28351a3db1d-subscriber.volatile.rcgu.o
-rw-r--r--  1 yuyang yuyang 1,3M  9-р сар  8 16:15 common_tracing-e4da751058b67ca8.core.86a0b28351a3db1d-in-common_tracing.86a0b28351a3db1d-result.volatile.rcgu.o
-rw-r--r--  1 yuyang yuyang 1,1M  9-р сар  8 16:15 common_tracing-e4da751058b67ca8.tracing_subscriber.86a0b28351a3db1d-in-common_tracing.86a0b28351a3db1d-fmt-format-json.volatile.rcgu.o
-rw-r--r--  1 yuyang yuyang 710K  9-р сар  8 16:15 common_tracing-e4da751058b67ca8.tracing_subscriber.86a0b28351a3db1d-in-common_tracing.86a0b28351a3db1d-fmt-format.volatile.rcgu.o
-rw-r--r--  1 yuyang yuyang 656K  9-р сар  8 16:15 common_tracing-e4da751058b67ca8.serde_json.86a0b28351a3db1d-in-common_tracing.86a0b28351a3db1d-ser.volatile.rcgu.o
-rw-r--r--  1 yuyang yuyang 492K  9-р сар  8 16:15 common_tracing-e4da751058b67ca8.core.86a0b28351a3db1d-in-common_tracing.86a0b28351a3db1d-iter-adapters-flatten.volatile.rcgu.o
-rw-r--r--  1 yuyang yuyang 382K  9-р сар  8 16:15 common_tracing-e4da751058b67ca8.opentelemetry_sdk.86a0b28351a3db1d-in-common_tracing.86a0b28351a3db1d-trace-span_processor.volatile.rcgu.o
-rw-r--r--  1 yuyang yuyang 346K  9-р сар  8 16:15 common_tracing-e4da751058b67ca8.tracing_subscriber.86a0b28351a3db1d-in-common_tracing.86a0b28351a3db1d-fmt.volatile.rcgu.o
-rw-r--r--  1 yuyang yuyang 330K  9-р сар  8 16:15 common_tracing-e4da751058b67ca8.core.86a0b28351a3db1d-in-common_tracing.86a0b28351a3db1d-iter-adapters-map.volatile.rcgu.o
-rw-r--r--  1 yuyang yuyang 328K  9-р сар  8 16:15 common_tracing-e4da751058b67ca8.core.86a0b28351a3db1d-in-common_tracing.86a0b28351a3db1d-iter-adapters-fuse.volatile.rcgu.o
-rw-r--r--  1 yuyang yuyang 314K  9-р сар  8 16:15 common_tracing-e4da751058b67ca8.core.86a0b28351a3db1d-in-common_tracing.86a0b28351a3db1d-pin.volatile.rcgu.o
-rw-r--r--  1 yuyang yuyang 222K  9-р сар  8 16:15 common_tracing-e4da751058b67ca8.tracing_subscriber.86a0b28351a3db1d-in-common_tracing.86a0b28351a3db1d-fmt-format-pretty.volatile.rcgu.o
-rw-r--r--  1 yuyang yuyang 215K  9-р сар  8 16:15 common_tracing-e4da751058b67ca8.tracing_subscriber.86a0b28351a3db1d-in-common_tracing.86a0b28351a3db1d-registry-extensions.volatile.rcgu.o
-rw-r--r--  1 yuyang yuyang 188K  9-р сар  8 16:15 lib.rmeta
-rw-r--r--  1 yuyang yuyang 183K  9-р сар  8 16:15 common_tracing-e4da751058b67ca8.opentelemetry_jaeger.86a0b28351a3db1d-in-common_tracing.86a0b28351a3db1d-exporter-config-agent.volatile.rcgu.o
-rw-r--r--  1 yuyang yuyang 170K  9-р сар  8 16:15 common_tracing-e4da751058b67ca8.futures_util.86a0b28351a3db1d-in-common_tracing.86a0b28351a3db1d-stream-stream-next.volatile.rcgu.o
-rw-r--r--  1 yuyang yuyang 162K  9-р сар  8 16:15 common_tracing-e4da751058b67ca8.futures_util.86a0b28351a3db1d-in-common_tracing.86a0b28351a3db1d-future-poll_fn.volatile.rcgu.o
-rw-r--r--  1 yuyang yuyang 161K  9-р сар  8 16:15 common_tracing-e4da751058b67ca8.futures_util.86a0b28351a3db1d-in-common_tracing.86a0b28351a3db1d-future.volatile.rcgu.o
-rw-r--r--  1 yuyang yuyang 158K  9-р сар  8 16:15 common_tracing-e4da751058b67ca8.futures_util.86a0b28351a3db1d-in-common_tracing.86a0b28351a3db1d-stream-select_with_strategy.volatile.rcgu.o
-rw-r--r--  1 yuyang yuyang 152K  9-р сар  8 16:15 common_tracing-e4da751058b67ca8.sentry_core.86a0b28351a3db1d-in-common_tracing.86a0b28351a3db1d-hub_impl.rcgu.o
-rw-r--r--  1 yuyang yuyang 149K  9-р сар  8 16:15 common_tracing-e4da751058b67ca8.sentry_core.86a0b28351a3db1d-in-common_tracing.86a0b28351a3db1d-scope-real.rcgu.o
-rw-r--r--  1 yuyang yuyang 141K  9-р сар  8 16:15 common_tracing-e4da751058b67ca8.opentelemetry_jaeger.86a0b28351a3db1d-in-common_tracing.86a0b28351a3db1d-exporter-uploader.volatile.rcgu.o
-rw-r--r--  1 yuyang yuyang 141K  9-р сар  8 16:15 common_tracing-e4da751058b67ca8.futures_util.86a0b28351a3db1d-in-common_tracing.86a0b28351a3db1d-stream-select.volatile.rcgu.o
-rw-r--r--  1 yuyang yuyang 133K  9-р сар  8 16:15 common_tracing-e4da751058b67ca8.opentelemetry_jaeger.86a0b28351a3db1d-in-common_tracing.86a0b28351a3db1d-exporter-agent.volatile.rcgu.o
-rw-r--r--  1 yuyang yuyang 129K  9-р сар  8 16:15 common_tracing-e4da751058b67ca8.futures_util.86a0b28351a3db1d-in-common_tracing.86a0b28351a3db1d-stream.volatile.rcgu.o
-rw-r--r--  1 yuyang yuyang 128K  9-р сар  8 16:15 common_tracing-e4da751058b67ca8.tracing_subscriber.86a0b28351a3db1d-in-common_tracing.86a0b28351a3db1d-filter-env-builder.volatile.rcgu.o
-rw-r--r--  1 yuyang yuyang 127K  9-р сар  8 16:15 common_tracing-e4da751058b67ca8.futures_util.86a0b28351a3db1d-in-common_tracing.86a0b28351a3db1d-lock-mutex.volatile.rcgu.o
-rw-r--r--  1 yuyang yuyang 121K  9-р сар  8 16:15 common_tracing-e4da751058b67ca8.futures_util.86a0b28351a3db1d-in-common_tracing.86a0b28351a3db1d-stream-stream-map.volatile.rcgu.o
-rw-r--r--  1 yuyang yuyang 113K  9-р сар  8 16:15 common_tracing-e4da751058b67ca8.futures_util.86a0b28351a3db1d-in-common_tracing.86a0b28351a3db1d-stream-futures_unordered.volatile.rcgu.o
-rw-r--r--  1 yuyang yuyang 110K  9-р сар  8 16:15 common_tracing-e4da751058b67ca8.sentry_core.86a0b28351a3db1d-in-common_tracing.86a0b28351a3db1d-performance.rcgu.o
-rw-r--r--  1 yuyang yuyang 108K  9-р сар  8 16:15 common_tracing-e4da751058b67ca8.sentry_core.86a0b28351a3db1d-in-common_tracing.86a0b28351a3db1d-performance.volatile.rcgu.o
-rw-r--r--  1 yuyang yuyang 107K  9-р сар  8 16:15 common_tracing-e4da751058b67ca8.tokio_stream.86a0b28351a3db1d-in-common_tracing.86a0b28351a3db1d-wrappers-interval.volatile.rcgu.o
-rw-r--r--  1 yuyang yuyang 107K  9-р сар  8 16:15 common_tracing-e4da751058b67ca8.std.86a0b28351a3db1d-in-common_tracing.86a0b28351a3db1d-thread.volatile.rcgu.o
-rw-r--r--  1 yuyang yuyang  98K  9-р сар  8 16:15 common_tracing-e4da751058b67ca8.futures_util.86a0b28351a3db1d-in-common_tracing.86a0b28351a3db1d-future-select.volatile.rcgu.o
-rw-r--r--  1 yuyang yuyang  97K  9-р сар  8 16:15 common_tracing-e4da751058b67ca8.alloc.86a0b28351a3db1d-in-common_tracing.86a0b28351a3db1d-collections-vec_deque.volatile.rcgu.o
-rw-r--r--  1 yuyang yuyang  94K  9-р сар  8 16:15 common_tracing-e4da751058b67ca8.opentelemetry_sdk.86a0b28351a3db1d-in-common_tracing.86a0b28351a3db1d-runtime.volatile.rcgu.o
-rw-r--r--  1 yuyang yuyang  93K  9-р сар  8 16:15 common_tracing-e4da751058b67ca8.tracing_core.86a0b28351a3db1d-in-common_tracing.86a0b28351a3db1d-metadata.volatile.rcgu.o
-rw-r--r--  1 yuyang yuyang  91K  9-р сар  8 16:15 common_tracing-e4da751058b67ca8.tracing_subscriber.86a0b28351a3db1d-in-common_tracing.86a0b28351a3db1d-registry-sharded.volatile.rcgu.o
-rw-r--r--  1 yuyang yuyang  88K  9-р сар  8 16:15 common_tracing-e4da751058b67ca8.tokio.86a0b28351a3db1d-in-common_tracing.86a0b28351a3db1d-sync-mpsc-chan.volatile.rcgu.o
-rw-r--r--  1 yuyang yuyang  73K  9-р сар  8 16:15 common_tracing-e4da751058b67ca8.core.86a0b28351a3db1d-in-common_tracing.86a0b28351a3db1d-ops-function.volatile.rcgu.o
-rw-r--r--  1 yuyang yuyang  73K  9-р сар  8 16:15 common_tracing-e4da751058b67ca8.tracing_appender.86a0b28351a3db1d-in-common_tracing.86a0b28351a3db1d-worker.volatile.rcgu.o
-rw-r--r--  1 yuyang yuyang  71K  9-р сар  8 16:15 common_tracing-e4da751058b67ca8.core.86a0b28351a3db1d-in-common_tracing.86a0b28351a3db1d-iter-adapters-cloned.volatile.rcgu.o
drwxrwxr-x  2 yuyang yuyang  68K  9-р сар  8 16:15 deps
-rw-r--r--  1 yuyang yuyang  67K  9-р сар  8 16:15 common_tracing-e4da751058b67ca8.opentelemetry_sdk.86a0b28351a3db1d-in-common_tracing.86a0b28351a3db1d-trace-provider.volatile.rcgu.o
-rw-r--r--  1 yuyang yuyang  65K  9-р сар  8 16:15 common_tracing-e4da751058b67ca8.crossbeam_channel.86a0b28351a3db1d-in-common_tracing.86a0b28351a3db1d-flavors-list.volatile.rcgu.o
-rw-r--r--  1 yuyang yuyang  65K  9-р сар  8 16:15 common_tracing-e4da751058b67ca8.core.86a0b28351a3db1d-in-common_tracing.86a0b28351a3db1d-iter-adapters-enumerate.volatile.rcgu.o
-rw-r--r--  1 yuyang yuyang  65K  9-р сар  8 16:15 common_tracing-e4da751058b67ca8.tokio.86a0b28351a3db1d-in-common_tracing.86a0b28351a3db1d-sync-mpsc-bounded.volatile.rcgu.o
-rw-r--r--  1 yuyang yuyang  63K  9-р сар  8 16:15 common_tracing-e4da751058b67ca8.common_tracing.86a0b28351a3db1d-panic_hook.rcgu.o
-rw-r--r--  1 yuyang yuyang  62K  9-р сар  8 16:15 common_tracing-e4da751058b67ca8.tracing_appender.86a0b28351a3db1d-in-common_tracing.86a0b28351a3db1d-non_blocking.volatile.rcgu.o
-rw-r--r--  1 yuyang yuyang  61K  9-р сар  8 16:15 common_tracing-e4da751058b67ca8.tokio_stream.86a0b28351a3db1d-in-common_tracing.86a0b28351a3db1d-wrappers-mpsc_bounded.volatile.rcgu.o
-rw-r--r--  1 yuyang yuyang  59K  9-р сар  8 16:15 common_tracing-e4da751058b67ca8.opentelemetry_api.86a0b28351a3db1d-in-common_tracing.86a0b28351a3db1d-trace-tracer.volatile.rcgu.o
-rw-r--r--  1 yuyang yuyang  56K  9-р сар  8 16:15 common_tracing-e4da751058b67ca8.crossbeam_channel.86a0b28351a3db1d-in-common_tracing.86a0b28351a3db1d-flavors-array.volatile.rcgu.o
-rw-r--r--  1 yuyang yuyang  55K  9-р сар  8 16:15 common_tracing-e4da751058b67ca8.crossbeam_channel.86a0b28351a3db1d-in-common_tracing.86a0b28351a3db1d-context.volatile.rcgu.o
-rw-r--r--  1 yuyang yuyang  55K  9-р сар  8 16:15 common_tracing-e4da751058b67ca8.tracing_appender.86a0b28351a3db1d-in-common_tracing.86a0b28351a3db1d-rolling.volatile.rcgu.o
-rw-r--r--  1 yuyang yuyang  53K  9-р сар  8 16:15 common_tracing-e4da751058b67ca8.tracing_serde.86a0b28351a3db1d-in-common_tracing.86a0b28351a3db1d.volatile.rcgu.o
-rw-r--r--  1 yuyang yuyang  53K  9-р сар  8 16:15 common_tracing-e4da751058b67ca8.alloc.86a0b28351a3db1d-in-common_tracing.86a0b28351a3db1d-alloc.rcgu.o
-rw-r--r--  1 yuyang yuyang  52K  9-р сар  8 16:15 common_tracing-e4da751058b67ca8.std.86a0b28351a3db1d-in-common_tracing.86a0b28351a3db1d-panicking.volatile.rcgu.o
-rw-r--r--  1 yuyang yuyang  50K  9-р сар  8 16:15 common_tracing-e4da751058b67ca8.core.86a0b28351a3db1d-in-common_tracing.86a0b28351a3db1d-iter-adapters-take.volatile.rcgu.o
-rw-r--r--  1 yuyang yuyang  49K  9-р сар  8 16:15 common_tracing-e4da751058b67ca8.core.86a0b28351a3db1d-in-common_tracing.86a0b28351a3db1d-task-poll.volatile.rcgu.o
-rw-r--r--  1 yuyang yuyang  49K  9-р сар  8 16:15 common_tracing-e4da751058b67ca8.tokio.86a0b28351a3db1d-in-common_tracing.86a0b28351a3db1d-sync-mpsc-list.volatile.rcgu.o
-rw-r--r--  1 yuyang yuyang  49K  9-р сар  8 16:15 common_tracing-e4da751058b67ca8.crossbeam_channel.86a0b28351a3db1d-in-common_tracing.86a0b28351a3db1d-flavors-zero.volatile.rcgu.o
-rw-r--r--  1 yuyang yuyang  49K  9-р сар  8 16:15 common_tracing-e4da751058b67ca8.once_cell.86a0b28351a3db1d-in-common_tracing.86a0b28351a3db1d-imp.volatile.rcgu.o
-rw-r--r--  1 yuyang yuyang  48K  9-р сар  8 16:15 common_tracing-e4da751058b67ca8.crossbeam_channel.86a0b28351a3db1d-in-common_tracing.86a0b28351a3db1d-counter.volatile.rcgu.o
-rw-r--r--  1 yuyang yuyang  48K  9-р сар  8 16:15 common_tracing-e4da751058b67ca8.crossbeam_channel.86a0b28351a3db1d-in-common_tracing.86a0b28351a3db1d-channel.volatile.rcgu.o
-rw-r--r--  1 yuyang yuyang  47K  9-р сар  8 16:15 common_tracing-e4da751058b67ca8.futures_channel.86a0b28351a3db1d-in-common_tracing.86a0b28351a3db1d-oneshot.volatile.rcgu.o
-rw-r--r--  1 yuyang yuyang  47K  9-р сар  8 16:15 common_tracing-e4da751058b67ca8.core.86a0b28351a3db1d-in-common_tracing.86a0b28351a3db1d-sync-atomic.volatile.rcgu.o
-rw-r--r--  1 yuyang yuyang  47K  9-р сар  8 16:15 common_tracing-e4da751058b67ca8.tokio.86a0b28351a3db1d-in-common_tracing.86a0b28351a3db1d-sync-mpsc-block.volatile.rcgu.o
-rw-r--r--  1 yuyang yuyang  44K  9-р сар  8 16:15 common_tracing-e4da751058b67ca8.alloc.86a0b28351a3db1d-in-common_tracing.86a0b28351a3db1d-collections-vec_deque-iter.volatile.rcgu.o
-rw-r--r--  1 yuyang yuyang  43K  9-р сар  8 16:15 common_tracing-e4da751058b67ca8.futures_util.86a0b28351a3db1d-in-common_tracing.86a0b28351a3db1d-stream-futures_unordered-task.volatile.rcgu.o
-rw-r--r--  1 yuyang yuyang  43K  9-р сар  8 16:15 common_tracing-e4da751058b67ca8.once_cell.86a0b28351a3db1d-in-common_tracing.86a0b28351a3db1d-sync.volatile.rcgu.o
-rw-r--r--  1 yuyang yuyang  41K  9-р сар  8 16:15 common_tracing-e4da751058b67ca8.opentelemetry_sdk.86a0b28351a3db1d-in-common_tracing.86a0b28351a3db1d-trace-tracer.volatile.rcgu.o
-rw-r--r--  1 yuyang yuyang  41K  9-р сар  8 16:15 common_tracing-e4da751058b67ca8.crossbeam_channel.86a0b28351a3db1d-in-common_tracing.86a0b28351a3db1d-waker.rcgu.o
-rw-r--r--  1 yuyang yuyang  40K  9-р сар  8 16:15 common_tracing-e4da751058b67ca8.core.86a0b28351a3db1d-in-common_tracing.86a0b28351a3db1d-iter-adapters-filter.volatile.rcgu.o
-rw-r--r--  1 yuyang yuyang  40K  9-р сар  8 16:15 common_tracing-e4da751058b67ca8.tracing_appender.86a0b28351a3db1d-in-common_tracing.86a0b28351a3db1d.volatile.rcgu.o
-rw-r--r--  1 yuyang yuyang  40K  9-р сар  8 16:15 common_tracing-e4da751058b67ca8.alloc.86a0b28351a3db1d-in-common_tracing.86a0b28351a3db1d-slice-hack.volatile.rcgu.o
-rw-r--r--  1 yuyang yuyang  39K  9-р сар  8 16:15 common_tracing-e4da751058b67ca8.tracing_subscriber.86a0b28351a3db1d-in-common_tracing.86a0b28351a3db1d-registry-sharded.rcgu.o

Is this normal?

The command should be cargo rustc -- -Zhuman-readable-cgu-names=yes.

This is normal for Rust.

It has unbelievably HUGE debug information. 95% of these files is debug info. You can set debug = 1 to get less bloated debug info.

On top of that rlibs often contain the standard library and lots of unused code. Rust throws everything in there, and then tells the linker to pick only used parts.

3 Likes

Release version of this is quite small.

warning: `common-tracing` (lib) generated 1 warning (run `cargo fix --lib -p common-tracing` to apply 1 suggestion)
    Finished dev [unoptimized + debuginfo] target(s) in 4.37s
total 1,4G
-rw-rw-r--  2 yuyang yuyang 1,4G  9-р сар  9 09:42 libcommon_tracing.rlib
drwxrwxr-x  2 yuyang yuyang  60K  9-р сар  9 09:42 deps
drwxrwxr-x 42 yuyang yuyang 4,0K  9-р сар  9 09:38 build
drwxrwxr-x  2 yuyang yuyang 4,0K  9-р сар  9 09:38 examples
drwxrwxr-x  5 yuyang yuyang 4,0K  9-р сар  9 09:39 incremental
-rw-rw-r--  1 yuyang yuyang  351  9-р сар  9 09:38 libcommon_tracing.d
total 16M
-rw-rw-r--  2 yuyang yuyang  16M  9-р сар  9 09:42 libcommon_tracing.rlib
drwxrwxr-x  2 yuyang yuyang  36K  9-р сар  9 09:42 deps
drwxrwxr-x 42 yuyang yuyang 4,0K  9-р сар  9 09:37 build
drwxrwxr-x  2 yuyang yuyang 4,0K  9-р сар  9 09:37 examples
drwxrwxr-x  2 yuyang yuyang 4,0K  9-р сар  9 09:37 incremental
-rw-rw-r--  1 yuyang yuyang  353  9-р сар  9 09:38 libcommon_tracing.d

1 Like

192 MB for core::Option, neat.

Option has a lot of methods, and if I understand it correctly, they are all generating separate code per instantiation (I would hope only the actually used ones for each instantiation, but who knows)

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.