https://github.com/pmunch/libfuse-nim
https://github.com/pmunch/libfuse-nim
Last synced: 11 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/pmunch/libfuse-nim
- Owner: PMunch
- Created: 2023-12-19T09:38:37.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2024-04-09T21:04:18.000Z (about 2 years ago)
- Last Synced: 2025-04-05T16:36:44.705Z (about 1 year ago)
- Language: Nim
- Size: 13.7 KB
- Stars: 6
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# LibFUSE wrapper
This library was originally just created to share my experimentation with
[LibFUSE](https://github.com/libfuse/libfuse) in Nim. However I want to use it
for other projects and figured making a proper Nimble package would make things
easier.
For now you can compile the examples by installing libfuse3 (if you don't
already have it) along with Nim and Futhark, then `cd` into the `examples`
folder and run `nim c hello` to compile and `./hello ` to
create the filesystem. You can also use `--help` to get the options for the
program, along with FUSE options. The same goes for the `jsonfile` example.
In `hello.nim` I've implemented the `hello.c` "filesystem" to check that
everything worked as expected. And it should be rather easy to create more
complex filesystems with this.
Things implemented:
- `hello.nim` simple filesystem which mounts a single folder with a single file
the content of which can be controlled with options on startup.
- `jsonfile.nim` takes a JSON object as a string as an option and mounts one
file per key, and a directory for each object and array. Keys can be written,
and on unmount the final object is written out. Make sure to not run in
daemon mode if you want to see the output.