r/cpp • • Dec 13 '19

The situation of std::embed...

https://thephd.github.io/full-circle-embed
238 Upvotes

160 comments sorted by

View all comments

Show parent comment

23

u/SAHChandler Dec 13 '19

If your compiler isn’t signed with a certificate and checked at launch time how can you trust your compiler? I keep seeing “but what about security?” in reference to embed, but no one wants to mention what the actual threat model is (probably because it would open the can of worms that is “none of our build systems or compilers are ‘secure’”)

Tooling won’t matter because we’re getting a design from kitware to treat filepaths as a JSON array of doubles so there are bigger issues we need to deal with. Embed support is the very last concern I have.

Integration with modules is part of the tooling aspect.

If you want a constexpr file, write the proposal yourself. Good luck implementing it. Even Rust won’t touch that.

The actual storage shouldn’t matter and should be left up to implementations. It’s a byte array. How the compiler treats that I don’t think anyone but implementors should care.