11 unstable releases

0.6.3 Sep 2, 2025
0.6.1 Apr 30, 2025
0.5.1 Jan 11, 2023
0.4.1 May 16, 2022
0.1.0 Oct 29, 2019

#1515 in Filesystem

Download history 186/week @ 2025-09-19 166/week @ 2025-09-26 251/week @ 2025-10-03 249/week @ 2025-10-10 240/week @ 2025-10-17 176/week @ 2025-10-24 247/week @ 2025-10-31 331/week @ 2025-11-07 285/week @ 2025-11-14 282/week @ 2025-11-21 299/week @ 2025-11-28 292/week @ 2025-12-05 510/week @ 2025-12-12 273/week @ 2025-12-19 237/week @ 2025-12-26 368/week @ 2026-01-02

1,418 downloads per month
Used in 7 crates (6 directly)

MIT license

125KB
2K SLoC

Shell Link parser and writer for Rust

Works on any OS - although only really useful in Windows, this library can parse and write .lnk files, a shell link, that can be understood by Windows.

To get started, see the docs.rs documentation.


lib.rs:

Shell Link parser and writer for Rust.

Works on any OS - although only really useful in Windows, this library can parse and write .lnk files, a shell link, that can be understood by Windows.

To get started, see the ShellLink struct.

The full specification of these files can be found at Microsoft's Website.

Read Example

A simple example appears as follows:

use lnk::ShellLink;
use lnk::encoding::WINDOWS_1252;
// ...
let shortcut = lnk::ShellLink::open("tests/data/test.lnk", WINDOWS_1252).unwrap();
println!("{:#?}", shortcut);

Write Example

A simple example appears as follows:

use lnk::ShellLink;
// ...
ShellLink::new_simple(std::path::Path::new(r"C:\Windows\System32\notepad.exe"));

IMPORTANT!: Writing capability is currently in a very early stage and probably won't work!

Dependencies

~5–19MB
~297K SLoC