nimclipboard
Nim wrapper for libclipboard
Wraps a native library — check OS Compatibility below for platform-specific linking notes.
Summary
| Latest Version | Unknown |
|---|---|
| License | MIT |
| CI Status | Failing |
| Downloads | 0 |
| Last Indexed | 2026-07-21 05:24 |
Tags
Installation
nimble install nimclipboard
choosenim install nimclipboard
git clone https://github.com/genotrance/nimclipboard
OS Compatibility
| Platform | Linux | macOS | Windows | FreeBSD | OpenBSD | NetBSD | Android | iOS | WASM | Embedded |
|---|---|---|---|---|---|---|---|---|---|---|
| nimclipboard | ✓ | ✓ | ✓ | - | - | - | - | - | - | - |
Source
| Repository | https://github.com/genotrance/nimclipboard |
|---|---|
| Homepage | https://github.com/genotrance/nimclipboard |
| Registry Source | nimble_official |
README
Nimclipboard is a Nim wrapper for libclipboard.
Nimclipboard is distributed as a Nimble package and depends on nimgen and c2nim to generate the wrappers. The libclipboard source code is downloaded using Git so having git in the path is required.
Installation
Nimclipboard can be installed via Nimble:
> nimble install nimclipboard
This will download, wrap and install nimclipboard in the standard Nimble package location, typically ~/.nimble. Once installed, it can be imported into any Nim program.
Usage
Module documentation can be found here.
import nimclipboard/libclipboard
var cb = clipboard_new(nil)
cb.clipboard_clear(LCB_CLIPBOARD)
echo cb.clipboard_set_text("nimclipboard rocks")
echo cb.clipboard_text()
cb.clipboard_free()
Refer to the tests directory for examples on how the library can be used.
Credits
Nimclipboard wraps the libclipboard source code and all licensing terms of libclipboard apply to the usage of this package.
Credits go out to c2nim as well without which this package would be greatly limited in its abilities.
Feedback
Nimclipboard is a work in progress and any feedback or suggestions are welcome. It is hosted on GitHub with an MIT license so issues, forks and PRs are most appreciated.