https://github.com/scala-network/libipfs
A C-Style library implemented in Go for using IPFS in C++/C.
https://github.com/scala-network/libipfs
cryptocurrency ipfs
Last synced: 11 months ago
JSON representation
A C-Style library implemented in Go for using IPFS in C++/C.
- Host: GitHub
- URL: https://github.com/scala-network/libipfs
- Owner: scala-network
- License: bsd-3-clause
- Created: 2018-07-22T11:25:46.000Z (almost 8 years ago)
- Default Branch: development
- Last Pushed: 2025-04-20T11:52:48.000Z (about 1 year ago)
- Last Synced: 2025-04-20T12:40:40.113Z (about 1 year ago)
- Topics: cryptocurrency, ipfs
- Language: Go
- Homepage:
- Size: 374 MB
- Stars: 28
- Watchers: 3
- Forks: 7
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# libIPFS
`libIPFS` is a C-style library that wraps around `go-ipfs` as a library (not an embedded executable) and provides a simple and intuitive API.
## Building
Use the provided `Makefile` to build the library. For example, to build for Linux on `amd64`:
```bash
make build_linux_amd64
```
You can also build for other platforms by specifying the target:
```bash
make build_windows_amd64
make build_darwin_amd64
make build_darwin_arm64
make build_linux_riscv64
make build_linux_arm64
make build_freebsd_amd64
```
> **Note:**
> - Cross-compilation has been tested on Debian 12.
> - For FreeBSD builds, you may need a proper sysroot configuration.
> - For macOS builds, `osxcross` is required.
## Usage
An example program, `example.cpp`, is provided in the root of the repository. After building the library, copy the example file to the `bin/` folder and compile it with `g++`:
```bash
g++ -pthread -o libipfs-example example.cpp libipfs-linux-amd64.a -Wl,--no-as-needed -ldl -lresolv
```
Run the compiled example:
```bash
./libipfs-example
```
## License
This project is licensed under the terms specified in the [LICENSE](LICENSE) file.