cognitive-engineering-lab / rust-book

The Rust Programming Language: Experimental Edition
https://rust-book.cs.brown.edu
Other
503 stars 82 forks source link

[Feature Idea] Allow selecting your OS #166

Open jcc10 opened 4 months ago

jcc10 commented 4 months ago

It may be worthwhile to add a basic selector of the OS to the book. If selecting Linux/MacOS it would hide the Windows version of commands, and if selecting Windows it would hide the Unix style commands. Of course it could default to 'Unknown' which would simply not hide either of them.

It might be useful to display it as collapsible sections with OS specific options pre-collapsed. In addition there are some sections such as noting that Windows generates a file with debugging information whereas other OS's don't. It may be best to have something bringing attention to such significant/major differences.

I am unsure how much work this would be to add however I feel it would help make the book feel cleaner.

willcrichton commented 3 months ago

I don't have the bandwidth to implement this feature, but I would welcome a contribution if anyone wants to do it.