@@ -19,7 +19,7 @@ rustix = { version = "0.38.26", default-features = false }
1919bitflags = { version = " 2.4.0" , default-features = false }
2020memoffset = { version = " 0.9.0" , optional = true }
2121log = { version = " 0.4.14" , default-features = false , optional = true }
22- rustix-futex-sync = " 0.2.1"
22+ rustix-futex-sync = { version = " 0.2.1" , optional = true }
2323
2424# Optional logging backends for use with "origin-program". You can use any
2525# external logger, but using these features allows origin to initialize the
@@ -40,19 +40,19 @@ errno = { version = "0.3.3", default-features = false, optional = true }
4040core = { version = " 1.0.0" , optional = true , package = " rustc-std-workspace-core" }
4141alloc = { version = " 1.0.0" , optional = true , package = " rustc-std-workspace-alloc" }
4242compiler_builtins = { version = " 0.1.101" , optional = true }
43- smallvec = { version = " 1.11.1" , features = [" const_new" ] }
43+ smallvec = { version = " 1.11.1" , optional = true , features = [" const_new" ] }
4444
4545[target .'cfg(not(target_arch = "arm"))' .dependencies .unwinding ]
4646version = " 0.2.0"
4747default-features = false
48- features = [ " unwinder" ]
48+ features = [" unwinder" ]
4949
5050[dev-dependencies ]
5151assert_cmd = " 2.0.12"
5252
5353[features ]
5454default = [" std" , " log" , " libc" , " errno" , " thread" , " init-fini-arrays" ]
55- std = [" rustix/std" , " bitflags/std" ]
55+ std = [" rustix/std" , " bitflags/std" , " alloc " ]
5656rustc-dep-of-std = [
5757 " dep:core" ,
5858 " dep:alloc" ,
@@ -72,10 +72,14 @@ set_thread_id = []
7272origin-program = []
7373
7474# Use origin's implementation of thread startup and shutdown.
75- origin-thread = [" memoffset" , " rustix/runtime" , " origin-program" , " thread" ]
75+ #
76+ # To use threads, it's also necessary to enable the "thread" feature.
77+ origin-thread = [" memoffset" , " rustix/runtime" , " origin-program" ]
7678
7779# Use origin's implementation of signal handle registrtion.
78- origin-signal = [" rustix/runtime" , " signal" ]
80+ #
81+ # To use threads, it's also necessary to enable the "signal" feature.
82+ origin-signal = [" rustix/runtime" ]
7983
8084# Use origin's `_start` definition.
8185origin-start = [" rustix/use-explicitly-provided-auxv" , " rustix/runtime" , " origin-program" ]
@@ -96,13 +100,10 @@ max_level_off = ["log/max_level_off"]
96100
97101# Enable features which depend on the Rust global allocator, such as functions
98102# that return owned strings or `Vec`s.
99- alloc = [" rustix/alloc" ]
103+ alloc = [" rustix/alloc" , " smallvec " ]
100104
101105# Enable support for threads.
102- #
103- # Origin's threads support currently depends on dynamic allocation, so it
104- # pulls in the "alloc" feature.
105- thread = [" alloc" , " rustix/thread" , " rustix/mm" , " param" , " rustix/process" , " rustix/runtime" ]
106+ thread = [" rustix/thread" , " rustix/mm" , " param" , " rustix/process" , " rustix/runtime" , " rustix-futex-sync" ]
106107
107108# Enable support for signal handlers.
108109signal = [" rustix/runtime" ]
0 commit comments