parent
1f83b5c508
commit
0e4d9472a9
3
Cargo.lock
generated
3
Cargo.lock
generated
@ -3984,10 +3984,8 @@ dependencies = [
|
|||||||
"block",
|
"block",
|
||||||
"byteorder",
|
"byteorder",
|
||||||
"bytes 1.5.0",
|
"bytes 1.5.0",
|
||||||
"cocoa",
|
|
||||||
"collections",
|
"collections",
|
||||||
"core-foundation",
|
"core-foundation",
|
||||||
"core-graphics 0.22.3",
|
|
||||||
"foreign-types 0.3.2",
|
"foreign-types 0.3.2",
|
||||||
"futures 0.3.28",
|
"futures 0.3.28",
|
||||||
"gpui",
|
"gpui",
|
||||||
@ -3997,7 +3995,6 @@ dependencies = [
|
|||||||
"log",
|
"log",
|
||||||
"media",
|
"media",
|
||||||
"nanoid",
|
"nanoid",
|
||||||
"objc",
|
|
||||||
"parking_lot 0.11.2",
|
"parking_lot 0.11.2",
|
||||||
"postage",
|
"postage",
|
||||||
"serde",
|
"serde",
|
||||||
|
@ -12,9 +12,11 @@ doctest = false
|
|||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
bitflags = "1"
|
bitflags = "1"
|
||||||
fsevent-sys = "3.0.2"
|
|
||||||
parking_lot.workspace = true
|
parking_lot.workspace = true
|
||||||
|
|
||||||
|
[target.'cfg(target_os = "macos")'.dependencies]
|
||||||
|
fsevent-sys = "3.0.2"
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
tempfile.workspace = true
|
tempfile.workspace = true
|
||||||
|
|
||||||
|
@ -1,10 +1,12 @@
|
|||||||
use fsevent::EventStream;
|
#[cfg(target_os = "macos")]
|
||||||
use std::{env::args, path::Path, time::Duration};
|
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
|
use fsevent::EventStream;
|
||||||
|
use std::{env::args, path::Path, time::Duration};
|
||||||
|
|
||||||
let paths = args().skip(1).collect::<Vec<_>>();
|
let paths = args().skip(1).collect::<Vec<_>>();
|
||||||
let paths = paths.iter().map(Path::new).collect::<Vec<_>>();
|
let paths = paths.iter().map(Path::new).collect::<Vec<_>>();
|
||||||
assert!(!paths.is_empty(), "Must pass 1 or more paths as arguments");
|
assert!(!paths.is_empty(), "Must pass 1 or more paths as arguments");
|
||||||
|
|
||||||
let (stream, _handle) = EventStream::new(&paths, Duration::from_millis(100));
|
let (stream, _handle) = EventStream::new(&paths, Duration::from_millis(100));
|
||||||
stream.run(|events| {
|
stream.run(|events| {
|
||||||
eprintln!("event batch");
|
eprintln!("event batch");
|
||||||
@ -14,3 +16,8 @@ fn main() {
|
|||||||
true
|
true
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(not(target_os = "macos"))]
|
||||||
|
fn main() {
|
||||||
|
eprintln!("This example only works on macOS");
|
||||||
|
}
|
||||||
|
@ -31,8 +31,6 @@ media = { path = "../media" }
|
|||||||
|
|
||||||
anyhow.workspace = true
|
anyhow.workspace = true
|
||||||
async-broadcast = "0.4"
|
async-broadcast = "0.4"
|
||||||
core-foundation = "0.9.3"
|
|
||||||
core-graphics = "0.22.3"
|
|
||||||
futures.workspace = true
|
futures.workspace = true
|
||||||
log.workspace = true
|
log.workspace = true
|
||||||
parking_lot.workspace = true
|
parking_lot.workspace = true
|
||||||
@ -41,6 +39,9 @@ postage.workspace = true
|
|||||||
async-trait = { workspace = true, optional = true }
|
async-trait = { workspace = true, optional = true }
|
||||||
nanoid = { version ="0.4", optional = true}
|
nanoid = { version ="0.4", optional = true}
|
||||||
|
|
||||||
|
[target.'cfg(target_os = "macos")'.dependencies]
|
||||||
|
core-foundation = "0.9.3"
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
collections = { path = "../collections", features = ["test-support"] }
|
collections = { path = "../collections", features = ["test-support"] }
|
||||||
gpui = { path = "../gpui", features = ["test-support"] }
|
gpui = { path = "../gpui", features = ["test-support"] }
|
||||||
@ -53,14 +54,10 @@ async-trait.workspace = true
|
|||||||
block = "0.1"
|
block = "0.1"
|
||||||
bytes = "1.2"
|
bytes = "1.2"
|
||||||
byteorder = "1.4"
|
byteorder = "1.4"
|
||||||
cocoa = "0.25"
|
|
||||||
core-foundation = "0.9.3"
|
|
||||||
core-graphics = "0.22.3"
|
|
||||||
foreign-types = "0.3"
|
foreign-types = "0.3"
|
||||||
futures.workspace = true
|
futures.workspace = true
|
||||||
hmac = "0.12"
|
hmac = "0.12"
|
||||||
jwt = "0.16"
|
jwt = "0.16"
|
||||||
objc = "0.2"
|
|
||||||
parking_lot.workspace = true
|
parking_lot.workspace = true
|
||||||
serde.workspace = true
|
serde.workspace = true
|
||||||
serde_derive.workspace = true
|
serde_derive.workspace = true
|
||||||
|
@ -35,7 +35,10 @@ pub struct SwiftTarget {
|
|||||||
const MACOS_TARGET_VERSION: &str = "10.15.7";
|
const MACOS_TARGET_VERSION: &str = "10.15.7";
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
if cfg!(not(any(test, feature = "test-support"))) {
|
if cfg!(all(
|
||||||
|
target_os = "macos",
|
||||||
|
not(any(test, feature = "test-support"))
|
||||||
|
)) {
|
||||||
let swift_target = get_swift_target();
|
let swift_target = get_swift_target();
|
||||||
|
|
||||||
build_bridge(&swift_target);
|
build_bridge(&swift_target);
|
||||||
|
@ -14,10 +14,12 @@ doctest = false
|
|||||||
anyhow.workspace = true
|
anyhow.workspace = true
|
||||||
block = "0.1"
|
block = "0.1"
|
||||||
bytes = "1.2"
|
bytes = "1.2"
|
||||||
core-foundation = "0.9.3"
|
|
||||||
foreign-types = "0.3"
|
foreign-types = "0.3"
|
||||||
metal = "0.21.0"
|
|
||||||
|
[target.'cfg(target_os = "macos")'.dependencies]
|
||||||
|
core-foundation = "0.9.3"
|
||||||
objc = "0.2"
|
objc = "0.2"
|
||||||
|
metal = "0.21.0"
|
||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
bindgen = "0.65.1"
|
bindgen = "0.65.1"
|
||||||
|
Loading…
Reference in New Issue
Block a user