Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve volume label configuration #28

Merged
merged 15 commits into from
Mar 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
344 changes: 38 additions & 306 deletions Cargo.lock

Large diffs are not rendered by default.

28 changes: 27 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
fn main() {
winfsp_build::build();
winfsp_wrs_build::build();
}
Loading
Loading