- Light (default)
The Cargo Book
Cargo-doc(1).
cargo-doc - Build a package’s documentation
cargo doc [ options ]
DESCRIPTION
Build the documentation for the local package and all dependencies. The output is placed in target/doc in rustdoc’s usual format.
Documentation Options
Package selection.
By default, when no package selection options are given, the packages selected depend on the selected manifest file (based on the current working directory if --manifest-path is not given). If the manifest is the root of a workspace then the workspaces default members are selected, otherwise only the package defined by the manifest will be selected.
The default members of a workspace can be set explicitly with the workspace.default-members key in the root manifest. If this is not set, a virtual workspace will include all workspace members (equivalent to passing --workspace ), and a non-virtual workspace will include only the root crate itself.
Target Selection
When no target selection options are given, cargo doc will document all binary and library targets of the selected package. The binary will be skipped if its name is the same as the lib target. Binaries are skipped if they have required-features that are missing.
The default behavior can be changed by setting doc = false for the target in the manifest settings. Using target selection options will ignore the doc flag and will always document the given target.
Feature Selection
The feature flags allow you to control which features are enabled. When no feature options are given, the default feature is activated for every selected package.
See the features documentation for more details.
Compilation Options
This may also be specified with the build.target config value .
Note that specifying this flag makes Cargo run in a different mode where the target artifacts are placed in a separate directory. See the build cache documentation for more details. -r --release Document optimized artifacts with the release profile. See also the --profile option for choosing a specific profile by name. --profile name Document with the given profile. See the the reference for more details on profiles. --ignore-rust-version Document the target even if the selected Rust compiler is older than the required Rust version as configured in the project's rust-version field. --timings= fmts Output information how long each compilation takes, and track concurrency information over time. Accepts an optional comma-separated list of output formats; --timings without an argument will default to --timings=html . Specifying an output format (rather than the default) is unstable and requires -Zunstable-options . Valid output formats:
- html (unstable, requires -Zunstable-options ): Write a human-readable file cargo-timing.html to the target/cargo-timings directory with a report of the compilation. Also write a report to the same directory with a timestamp in the filename if you want to look at older runs. HTML output is suitable for human consumption only, and does not provide machine-readable timing data.
- json (unstable, requires -Zunstable-options ): Emit machine-readable JSON information about timing information.
Output Options
Display options.
- auto (default): Automatically detect if color support is available on the terminal.
- always : Always display colors.
- never : Never display colors.
May also be specified with the term.color config value . --message-format fmt The output format for diagnostic messages. Can be specified multiple times and consists of comma-separated values. Valid values:
- human (default): Display in a human-readable text format. Conflicts with short and json .
- short : Emit shorter, human-readable text messages. Conflicts with human and json .
- json : Emit JSON messages to stdout. See the reference for more details. Conflicts with human and short .
- json-diagnostic-short : Ensure the rendered field of JSON messages contains the "short" rendering from rustc. Cannot be used with human or short .
- json-diagnostic-rendered-ansi : Ensure the rendered field of JSON messages contains embedded ANSI color codes for respecting rustc's default color scheme. Cannot be used with human or short .
- json-render-diagnostics : Instruct Cargo to not include rustc diagnostics in JSON messages printed, but instead Cargo itself should render the JSON diagnostics coming from rustc. Cargo's own JSON diagnostics and others coming from rustc are still emitted. Cannot be used with human or short .
Manifest Options
These may be used in environments where you want to assert that the Cargo.lock file is up-to-date (such as a CI build) or want to avoid network access. --offline Prevents Cargo from accessing the network for any reason. Without this flag, Cargo will stop with an error if it needs to access the network and the network is not available. With this flag, Cargo will attempt to proceed without the network if possible.
Beware that this may result in different dependency resolution than online mode. Cargo will restrict itself to crates that are downloaded locally, even if there might be a newer version as indicated in the local copy of the index. See the cargo-fetch(1) command to download dependencies before going offline.
Common Options
Miscellaneous options, environment.
See the reference for details on environment variables that Cargo reads.
EXIT STATUS
- 0 : Cargo succeeded.
- 101 : Cargo failed to complete.
Build the local package documentation and its dependencies and output to target/doc .
cargo(1) , cargo-rustdoc(1) , rustdoc(1)
Search code, repositories, users, issues, pull requests...
Provide feedback.
We read every piece of feedback, and take your input very seriously.
Saved searches
Use saved searches to filter your results more quickly.
To see all available qualifiers, see our documentation .
- Notifications
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement . We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cargo doc --open starts MacVim instead of Safari #9374
SteveNg2013 commented Apr 18, 2021
Sorry, something went wrong.
No branches or pull requests
- Light (default)
The Cargo Book
Cargo-doc(1).
cargo-doc - Build a package's documentation
cargo doc [ options ]
DESCRIPTION
Build the documentation for the local package and all dependencies. The output is placed in target/doc in rustdoc's usual format.
Documentation Options
Package selection.
By default, when no package selection options are given, the packages selected depend on the selected manifest file (based on the current working directory if --manifest-path is not given). If the manifest is the root of a workspace then the workspaces default members are selected, otherwise only the package defined by the manifest will be selected.
The default members of a workspace can be set explicitly with the workspace.default-members key in the root manifest. If this is not set, a virtual workspace will include all workspace members (equivalent to passing --workspace ), and a non-virtual workspace will include only the root crate itself.
Target Selection
When no target selection options are given, cargo doc will document all binary and library targets of the selected package. The binary will be skipped if its name is the same as the lib target. Binaries are skipped if they have required-features that are missing.
The default behavior can be changed by setting doc = false for the target in the manifest settings. Using target selection options will ignore the doc flag and will always document the given target.
Feature Selection
The feature flags allow you to control which features are enabled. When no feature options are given, the default feature is activated for every selected package.
See the features documentation for more details.
Compilation Options
This may also be specified with the build.target config value .
Output Options
Display options.
- auto (default): Automatically detect if color support is available on the terminal.
- always : Always display colors.
- never : Never display colors.
May also be specified with the term.color config value . --message-format fmt The output format for diagnostic messages. Can be specified multiple times and consists of comma-separated values. Valid values:
- human (default): Display in a human-readable text format. Conflicts with short and json .
- short : Emit shorter, human-readable text messages. Conflicts with human and json .
- json : Emit JSON messages to stdout. See the reference for more details. Conflicts with human and short .
- json-diagnostic-short : Ensure the rendered field of JSON messages contains the "short" rendering from rustc. Cannot be used with human or short .
- json-diagnostic-rendered-ansi : Ensure the rendered field of JSON messages contains embedded ANSI color codes for respecting rustc's default color scheme. Cannot be used with human or short .
- json-render-diagnostics : Instruct Cargo to not include rustc diagnostics in in JSON messages printed, but instead Cargo itself should render the JSON diagnostics coming from rustc. Cargo's own JSON diagnostics and others coming from rustc are still emitted. Cannot be used with human or short .
Manifest Options
These may be used in environments where you want to assert that the Cargo.lock file is up-to-date (such as a CI build) or want to avoid network access. --offline Prevents Cargo from accessing the network for any reason. Without this flag, Cargo will stop with an error if it needs to access the network and the network is not available. With this flag, Cargo will attempt to proceed without the network if possible.
Beware that this may result in different dependency resolution than online mode. Cargo will restrict itself to crates that are downloaded locally, even if there might be a newer version as indicated in the local copy of the index. See the cargo-fetch(1) command to download dependencies before going offline.
Common Options
Miscellaneous options.
Profiles may be used to configure compiler options such as optimization levels and debug settings. See the reference for more details.
Profile selection depends on the target and crate being built. By default the dev or test profiles are used. If the --release flag is given, then the release or bench profiles are used.
Dependencies use the dev / release profiles.
ENVIRONMENT
See the reference for details on environment variables that Cargo reads.
EXIT STATUS
- 0 : Cargo succeeded.
- 101 : Cargo failed to complete.
Build the local package documentation and its dependencies and output to target/doc .
cargo(1) , cargo-rustdoc(1) , rustdoc(1)
Build a package's documentation
On this page
- Light (default)
The Cargo Book
cargo-doc - Build a package's documentation
cargo doc [ OPTIONS ]
DESCRIPTION
Build the documentation for the local package and all dependencies. The output is placed in target/doc in rustdoc’s usual format.
Documentation Options
Open the docs in a browser after building them.
Do not build documentation for dependencies.
Include non-public items in the documentation.
Package Selection
By default, when no package selection options are given, the packages selected depend on the current working directory. In the root of a virtual workspace, all workspace members are selected ( --all is implied). Otherwise, only the package in the current directory will be selected. The default packages may be overridden with the workspace.default-members key in the root Cargo.toml manifest.
Document only the specified packages. See cargo-pkgid(1) for the SPEC format. This flag may be specified multiple times.
Document all members in the workspace.
Exclude the specified packages. Must be used in conjunction with the --all flag. This flag may be specified multiple times.
Target Selection
When no target selection options are given, cargo doc will document all binary and library targets of the selected package. The binary will be skipped if its name is the same as the lib target. Binaries are skipped if they have required-features that are missing.
The default behavior can be changed by setting doc = false for the target in the manifest settings. Using target selection options will ignore the doc flag and will always document the given target.
Document the package’s library.
Document the specified binary. This flag may be specified multiple times.
Document all binary targets.
Feature Selection
When no feature options are given, the default feature is activated for every selected package.
Space or comma separated list of features to activate. These features only apply to the current directory’s package. Features of direct dependencies may be enabled with <dep-name>/<feature-name> syntax.
Activate all available features of all selected packages.
Do not activate the default feature of the current directory’s package.
Compilation Options
Document for the given architecture. The default is the host architecture. The general format of the triple is <arch><sub>-<vendor>-<sys>-<abi> . Run rustc --print target-list for a list of supported targets.
This may also be specified with the build.target config value .
Document optimized artifacts with the release profile. See the PROFILES section for details on how this affects profile selection.
Output Options
Directory for all generated artifacts and intermediate files. May also be specified with the CARGO_TARGET_DIR environment variable, or the build.target-dir config value . Defaults to target in the root of the workspace.
Display Options
Use verbose output. May be specified twice for "very verbose" output which includes extra output such as dependency warnings and build script output. May also be specified with the term.verbose config value .
No output printed to stdout.
Control when colored output is used. Valid values:
auto (default): Automatically detect if color support is available on the terminal.
always : Always display colors.
never : Never display colors.
May also be specified with the term.color config value .
The output format for diagnostic messages. Valid values:
human (default): Display in a human-readable text format.
json : Emit JSON messages to stdout.
short : Emit shorter, human-readable text messages.
Manifest Options
Path to the Cargo.toml file. By default, Cargo searches in the current directory or any parent directory for the Cargo.toml file.
Either of these flags requires that the Cargo.lock file is up-to-date. If the lock file is missing, or it needs to be updated, Cargo will exit with an error. The --frozen flag also prevents Cargo from attempting to access the network to determine if it is out-of-date.
These may be used in environments where you want to assert that the Cargo.lock file is up-to-date (such as a CI build) or want to avoid network access.
Prevents Cargo from accessing the network for any reason. Without this flag, Cargo will stop with an error if it needs to access the network and the network is not available. With this flag, Cargo will attempt to proceed without the network if possible.
Beware that this may result in different dependency resolution than online mode. Cargo will restrict itself to crates that are downloaded locally, even if there might be a newer version as indicated in the local copy of the index. See the cargo-fetch(1) command to download dependencies before going offline.
May also be specified with the net.offline config value .
Common Options
Prints help information.
Unstable (nightly-only) flags to Cargo. Run cargo -Z help for details.
Miscellaneous Options
Number of parallel jobs to run. May also be specified with the build.jobs config value . Defaults to the number of CPUs.
Profiles may be used to configure compiler options such as optimization levels and debug settings. See the reference for more details.
Profile selection depends on the target and crate being built. By default the dev or test profiles are used. If the --release flag is given, then the release or bench profiles are used.
Dependencies use the dev / release profiles.
ENVIRONMENT
See the reference for details on environment variables that Cargo reads.
Exit Status
Cargo succeeded.
Cargo failed to complete.
Build the local package documentation and its dependencies and output to target/doc .
cargo(1) , cargo-rustdoc(1) , rustdoc(1)
Live Refreshing Cargo Docs
rustdoc is a great tool, but as of now there isn’t an official way to have its generated docs refresh as you make edits. Running cargo doc with the --open argument will open the generated docs in browser window. If you make changes to your source code, you’ll need to re-run cargo doc to have the changes reflected in your browser. By chaining together a few other Rust tools, we can pretty easily get the functionality of live-reloading docs.
We’ll be 2 tools:
- cargo-watch to watch when our project’s source has changed and trigger the docs rebuild.
- This isn’t strictly necessary: As mentioned earlier, you can use the --open argument with cargo doc to view docs using the file:// protocol, but I like having a localhost address to visit.
I’ll assume that you already have cargo installed. If you don’t, then you can use rustup to install it.
Step 1: Install cargo-watch and https
First, install both commands we’ll need:
Step 2: Run Watch Command
Now, navigate to the project directory that contains your Cargo.toml file. Then, run the following:
You should now see something like the following:
You can visit localhost:8000 in your browser to view the generated docs. (Note: you’ll initially see a directory page, so you’ll have to navigate to one of the package listings to see actual docs)
If you make any changes to any source file in your project, you’ll see that cargo-watch will automatically re-run cargo doc and restart the file server. You should be able to refresh your browser and see the documentation changes live.
Bonus: Auto-refresh
One annoyance with this approach is that editing a source file does not trigger a refresh in the browser (i.e. you still have to refresh the page manually).
If you’re fine with using a node-based tool, browser-sync fixes this problem.
Install with:
… then edit your cargo-watch command to use browser-sync instead of http :
Now, visit localhost:3000 (or whichever port is listed on startup). Any subsequent changes to your Rust source code will now trigger any open browsers to refresh automatically with the updated documentation.
I’ve found that using this tweak to have auto-refreshing docs makes it much more pleasant to document my Rust crates. I’d love to see if there’s a more streamlined way to have auto-refreshing docs – be sure to let me know! 😄
Things to Do in Shcherbinka, Russia - Shcherbinka Attractions
Things to do in shcherbinka.
- 5.0 of 5 bubbles
- Good for Kids
- Good for Big Groups
- Adventurous
- Budget-friendly
- Good for a Rainy Day
- Hidden Gems
- Good for Couples
- Honeymoon spot
- Good for Adrenaline Seekers
- Things to do ranked using Tripadvisor data including reviews, ratings, photos, and popularity.
1. Church of St Martyr Grand Duchess Elizabeth
2. Monument to the Soldier Liberator
3. House of Culture
- Church of St Martyr Grand Duchess Elizabeth
- Monument to the Soldier Liberator
- House of Culture
- Hispanoamérica
- Work at ArchDaily
- Terms of Use
- Privacy Policy
- Cookie Policy
- Architecture News
IND Architects to Renovate Historic Water Tower in Moscow
- Written by Kaley Overstreet
- Published on May 05, 2018
IND Architects has plans to transform the symbolic Shcherbinka water tower in Moscow, Russia into a revitalized area for residents to socialize. Since the water tower has been only slightly altered over time with the overall form and silhouette remaining the same, the design team has decided to create a place that will both aim to recall old memories and create new ones.
To activate the historical interior space of the water tower, IND Architects created a number of spaces including areas where exhibitions can be on display, meetings and conferences can be held, and other events can occur in flexible, multipurpose rooms. The program also includes a café, a co-working area, and a large hall that features an opening façade to the landscape space. In the warmer seasons, concerts and sports events can be organized here.
The design of the water tower also placed a strong emphasis on how visitors will move through the volume and be able to experience all of the different areas. They will first enter the elevator and be taken to the top floor, and circulate down the stairs, passing and observing each program.
The water tower is lined with glass, allowing plenty of light to flow in and connect the visitors back to the landscape. At night, the tower will radiate a soft glow, showing the interesting programs and events happening inside.
News via: IND Architects .
Image gallery
- Sustainability
想阅读文章的中文版本吗?
IND 事务所改建莫斯科历史水塔,建造记忆活动中心
You've started following your first account, did you know.
You'll now receive updates based on what you follow! Personalize your stream and start following your favorite authors, offices and users.
IMAGES
VIDEO
COMMENTS
As the title; when I run cargo doc --open a tab opens in safari but the documentation looks like an early 2000s' site. Will post screenshots if needed. ... Had the same experience today... but it seems like new behavior. I wonder if a recent version of Safari changed a policy that affects cargo docs somehow.
Cargo's own JSON diagnostics and others coming from rustc are still emitted. Cannot be used with human or short. Manifest Options--manifest-path path Path to the Cargo.toml file. By default, Cargo searches for the Cargo.toml file in the current directory or any parent directory.--frozen--locked
cargo doc --run does not load the doc in Safari properly. Ask Question Asked 1 year, 6 months ago. Modified 1 year, 6 months ago. Viewed 230 times 2 I tried cargo doc --run and it doesn't load the docs properly. rust; rust-cargo; Share. Follow asked Aug 31, 2022 at 17:04. Kalapala Teja Kalapala Teja. 87 4 4 bronze badges. 4. 1. Please open the ...
cargo (1), cargo-rustdoc (1), rustdoc (1) A book on Rust's package manager and build system. Cargo is the Rust package manager. Cargo downloads your Rust package's dependencies, compiles your packages, makes distributable packages, and uploads them to crates.io, the Rust community's package registry.
Command issued: cargo doc --open Safari version: 14.1 MacOS: BigSur 11.3.1. rustup version: 1.24.2 rustc version: 1.52.1. I expected to see the crate's documentation being displayed and formatted properly. Instead, this happened: This is not by any means a problem of ndarray, I'm experiencing this with all the crates I've tried so far.
I typed 'cargo doc --open' on my iTerm terminal, expecting to see documentation on my browser (Safari) but instead MacVim pops up and displays the HTML. I am using cargo version 1.51.0 (43b129a 2021-03-16) and rustc 1.51.0 (2fd73fabe 2021-03-23). I just performed an rustup update.
However, to avoid your shell accidentally expanding glob patterns before Cargo handles them, you must use single quotes or double quotes around each pattern. Target Selection. When no target selection options are given, cargo doc will document all binary and library targets of the selected package. The binary will be skipped if its name is the ...
Do not print cargo log messages. --open. Opens the docs in a browser after the operation. --workspace. Document all packages in the workspace. --all. Alias for --workspace (deprecated) --no-deps. Don't build documentation for dependencies.
Target Selection. When no target selection options are given, cargo doc will document all binary and library targets of the selected package. The binary will be skipped if its name is the same as the lib target. Binaries are skipped if they have required-features that are missing. The default behavior can be changed by setting doc = false for ...
Compile a package. cargo-check (1) Check a local package and all of its dependencies for errors. cargo-clean (1) Remove artifacts that Cargo has generated in the past. cargo-doc (1) Build a package's documentation. cargo-fetch (1) Fetch dependencies of a package from the network.
Running cargo doc with the --open argument will open the generated docs in browser window. If you make changes to your source code, you'll need to re-run cargo doc to have the changes reflected in your browser. By chaining together a few other Rust tools, we can pretty easily get the functionality of live-reloading docs. Ben Congdon.
Open up doc/docs/index.html and check it out! It should show a link to the foo function's page, which is located at doc/docs/fn.foo.html. On that page, you'll see the "foo is a function" we put inside the documentation comment in our crate. Using rustdoc with Cargo. Cargo also has integration with rustdoc to make it
steffahn January 13, 2021, 1:51pm 7. cargo doc --open is a combination of doing an ordinary cargo doc and opening a web-browser looking at the documentation. Subsequent runs of cargo doc (or cargo doc --open) will replace/update the documentation, so if you refresh the site in your webbrowser, you'll always see the latest generated documentation.
With your last edits in mind: The rust docs are stored somewhere on your system. Find and navigate to that location and open the index.html with your browser from the terminal. If the problems persist your terminal might serve you with some messages which might give you a hint what is going wrong. dumindunuwan.
KDE is an international community creating free and open source software. Visit our main page to know more: https://kde.org ----- This is not a technical support forum.
FD20-1679(ФД20-1679) at the Experimental Ring of JSC Russian Railway Research Institute (VNIIZHT) for the 2017 Expo 1520 in Shcherbinka, Moscow.
Contacts. Warehouse address Yuzhnaya st. 2, office 1, Shcherbinka Phone / Fax 8 (800) 550-12-88 +7 (495) 215-04-42 E-mail General Enquiries & Proposals [email protected] Sales Department [email protected] HR Department +7 (495) 215-04-42 ext. 110 о[email protected]. загрузка карты...
When no target selection options are given, cargo rustdoc will document all binary and library targets of the selected package. The binary will be skipped if its name is the same as the lib target. Binaries are skipped if they have required-features that are missing. Passing target selection flags will document only the specified targets.
Things to Do in Shcherbinka. 1. Church of St Martyr Grand Duchess Elizabeth. 2. Monument to the Soldier Liberator. 3. House of Culture. 4. Varnika.
Published on May 05, 2018. Share. IND Architects has plans to transform the symbolic Shcherbinka water tower in Moscow, Russia into a revitalized area for residents to socialize. Since the water ...