Skip to content

Commit

Permalink
Merge pull request #28 from Scille/improvements
Browse files Browse the repository at this point in the history
Improve volume label configuration
  • Loading branch information
touilleMan committed Mar 18, 2024
2 parents 8665041 + c538774 commit 6f6a48a
Show file tree
Hide file tree
Showing 27 changed files with 10,185 additions and 896 deletions.
344 changes: 38 additions & 306 deletions Cargo.lock

Large diffs are not rendered by default.

28 changes: 27 additions & 1 deletion Cargo.toml
@@ -1,7 +1,33 @@
[workspace]
members = [
"examples/*",
"winfsp_build",
"winfsp_wrs_build",
"winfsp_wrs",
"winfsp_wrs_sys",
]
resolver = "2"

# Define values to be inherited by workspace members.
#
# For a member to inherit a value, it need to set `{key}.workspace = true`.
#
# https://doc.rust-lang.org/cargo/reference/workspaces.html#the-package-table
[workspace.package]
authors = [ "@Scille/parsec-dev", "@Scille/rust-code-owners" ]
edition = "2021"
license = "MIT OR Apache-2.0"
version = "0.2.0"
description = "WinFSP wrapper for rust"
repository = "https://github.com/Scille/winfsp_wrs"
keywords = [
"filesystem",
"mountpoint",
"windows",
"winfsp"
]
categories = [
"binding",
"filesystem",
"mountpoint",
"os::windows-api"
]
36 changes: 25 additions & 11 deletions README.md
Expand Up @@ -4,28 +4,42 @@

## Requirements

This project has two dependencies:
WinFSP must be installed:

- WinFSP obviously ;-p
- Clang, which is needed by [rust-bindgen](https://github.com/rust-lang/rust-bindgen) for parsing WinFPS C++ API headers.
```cmd.exe
choco install winfsp
```

## Run example

Install WinFPS:
```cmd.exe
cargo run -p memfs my-mountpoint
```

Install Clang (also [see rust-bindgen doc](https://rust-lang.github.io/rust-bindgen/requirements.html#windows))
## Testing

Download winfsp-tests: `https://github.com/winfsp/winfsp/releases/`

`winfsp-tests` itself depends on WinFSP's DLL, hence the easiest way to avoid troubles
is to put the `winfsp-tests` executable in the `C:/Program Files (x86)/WinFsp/bin/` install folder
(the alternative being to copy `C:/Program Files (x86)/WinFsp/bin/winfsp-x64.dll` in the directory
where `winfsp-tests` executable resides).

## Re-generate WinFSP bindgen code

(This is only needed when WinFSP headers change)

Clang is needed by [rust-bindgen](https://github.com/rust-lang/rust-bindgen) for parsing WinFPS C++ API headers.

To install Clang (also [see rust-bindgen doc](https://rust-lang.github.io/rust-bindgen/requirements.html#windows)):

```cmd.exe
winget install LLVM.LLVM
set LIBCLANG_PATH="C:\Program Files\LLVM\bin"
```

## Run example
Then to re-generate:

```cmd.exe
cargo run -p memfs my-mountpoint
python scripts/generate_bindgen.py winfsp_wrs_sys/src/gen.rs
```

## Testing

Download winfsp-tests: `https://github.com/winfsp/winfsp/releases/`
5 changes: 3 additions & 2 deletions examples/memfs/Cargo.toml
Expand Up @@ -4,7 +4,8 @@ version = "0.0.0"
edition = "2021"

[dependencies]
winfsp_wrs = { path = "../../winfsp_wrs", features = [] }
winfsp_wrs = { path = "../../winfsp_wrs" }
winfsp_wrs_build = { path = "../../winfsp_wrs_build" }

[build-dependencies]
winfsp_build = { path = "../../winfsp_build" }
winfsp_wrs_build = { path = "../../winfsp_wrs_build" }
2 changes: 1 addition & 1 deletion examples/memfs/build.rs
@@ -1,3 +1,3 @@
fn main() {
winfsp_build::build();
winfsp_wrs_build::build();
}

0 comments on commit 6f6a48a

Please sign in to comment.