This repository is cloned from the last CVS snapshot of OCamlFuse, with:
INTRODUCTION
This is a binding to fuse for the OCaml programming language, enabling you to write multithreaded filesystems with the OCaml language. It has been designed with simplicity as a goal, as you can see by looking at example/fusexmp.ml. Efficiency has also been a separate goal. The Bigarray library is used for read and writes, allowing the library to do zero-copy in OCaml land.
REQUIREMENTS
You need fuse (version 2.7 or greater)
https://www.sourceforge.net/projects/fuse
You also need OCaml >= 4.02.3 and camlidl >= 1.05.
GETTING STARTED
The recommended way to install this library is with opam.
opam install ocamlfuseINSTALLATION
If you don't want to install opam, you need to manually install this prerequisites:
Fuse
Should be in the major linux distributions, but you can find it at
https://fuse.sourceforge.net
You need to install libfuse-dev in debian and ubuntu.
OCaml >= 4.02.3
Should be in the major linux distributions, but is also available at
https://ocaml.org
CamlIDL >= 1.05
present at least in ubuntu, also available at
https://github.com/xavierleroy/camlidl
dune >= 3.7
available at
https://dune.build/
unpack the tarball, then
make
make installThis will install ocamlfuse in your ocaml library directory. To uninstall it you can run make uninstall.
TESTING
make example
cd _build/default/example
mkdir tmp
./fusexmp.exe tmp
cd tmp #you'll find a copy of your "/" directory hereNOTE: if you access the "clone" of the mountpoint of the filesystem, the fs will hang (kill it and then use fusermount -u to umount it). This is a known bug/limitation.
BEFORE YOU WRITE YOUR OWN FILESYSTEM
KNOWN PROBLEMS (if you can help, please do)
Fuse_util.c regarding st_blocks - if one implements statfs with a block size different than 512 "du" will not work on the filesystem.lstat64 and statfs, *xattr implementations for ocaml in Unix_utilUnix_util library uses unsafe coercions between unix file handles (which are defined as ints) and ints. Even if this works, in the future it might stop working.Unix_util.read and write operations have not been tested in case of errors. Error code conversion might be incorrect but I don't have test cases (maybe the easy way is to modify fusexmp to return various errors).unix_error but this would create troubles.HELPING THE PROJECT
The best help you can give to the project is to test everything, including, but not limited to:
Please report if you do serious tests! We need to know which programs did you use, if you found any bug, and how to reproduce the tests.
Also, we need packaging, I don't have the necessary time and don't know ocamlfindlib or GODI. Please if you have the time and the necessary knowledge help with packaging. Autoconf support would be highly appreciated, too.
A mailing list has been set up on sourceforge, you are strongly encouraged to post feedback there and in general to subscribe if you use ocamlfuse.
The sourceforge page for ocamlfuse is
https://sourceforge.net/projects/ocamlfuse
Bye and have fun
Vincenzo Ciancia
vincenzo_ml at yahoo dot it ciancia at di dot unipi dot it applejack at users dot sourceforge dot net