Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Silicon
Silicon is an alternative to Carbon implemented in Rust.
It can render your source code into a beautiful image.
Why Silicon
Carbon is a wonderful tool to create a beautiful image of your source code.
But it is a web application, which brings the following disadvantages:
- Cannot work without Internet & browser.
- Doesn't work well with shell. (Although there is carbon-now-cli, its experience is not very good, especially when the network is not so good.)
However, Silicon doesn't have these problems. It's is implemented in Rust and can work without browser & Internet.
Silicon can render your source code on the fly while carbon-now-cli takes several seconds on it.
Disadvantages
It's not as beautiful as Carbon...
Install
Cargo
AUR
Silicon is available on AUR (Thanks to @radmen).
You can install it with any AUR helpers you like.
eg.
Homebrew
You can install Silicon using Homebrew:
Dependencies
Ubuntu
Fedora
Arch Linux
Examples
Read code from file
Read code from clipboard, and copy the result image to clipboard
Specify a fallback font list and their size
Highlight specified line
Custom the image
Transparent background
The color can be #RGB[A]
or #RRGGBB[AA]
see silicon --help
for detail
Adding new syntaxes / themes
Silicon reads syntax-definition and theme cache from bat's cache directory.
You can find the steps to add new syntaxes / themes for bat here: sharkdp/bat#adding-new-syntaxes--language-definitions.
Configuration file
You can write some common args to silicon --config-file
.
Example:
# enable shadow
--shadow-color '#555'
--background '#fff'
--shadow-blur-radius 30
--no-window-controls