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 problem. 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
# or the latest version (Linux/macOS)
# for Windows (see #11)
xclip
, libxcb
, fontconfig
is required on Linux.
On Arch Linux, you can install them by pacman -S libxcb fontconfig xclip
AUR
Silicon is available on AUR (Thanks to @radmen).
You can install it with any AUR helpers you like.
eg.
Basic Usage
Read code from file
Read code from clipboard, and copy the result image to clipboard(--to-clipboard
is only available on Linux)
Use multiple fonts
Highlight specified line
Custom the image
see silicon --help
for detail