File tree 13 files changed +980
-9
lines changed
13 files changed +980
-9
lines changed Original file line number Diff line number Diff line change @@ -473,21 +473,16 @@ pub mod f64;
473
473
pub mod thread;
474
474
pub mod ascii;
475
475
pub mod collections;
476
- #[ cfg( not( target_os = "cloudabi" ) ) ]
477
476
pub mod env;
478
477
pub mod error;
479
478
pub mod ffi;
480
- #[ cfg( not( target_os = "cloudabi" ) ) ]
481
479
pub mod fs;
482
480
pub mod io;
483
- #[ cfg( not( target_os = "cloudabi" ) ) ]
484
481
pub mod net;
485
482
pub mod num;
486
483
pub mod os;
487
484
pub mod panic;
488
- #[ cfg( not( target_os = "cloudabi" ) ) ]
489
485
pub mod path;
490
- #[ cfg( not( target_os = "cloudabi" ) ) ]
491
486
pub mod process;
492
487
pub mod sync;
493
488
pub mod time;
Original file line number Diff line number Diff line change 8
8
// option. This file may not be copied, modified, or distributed
9
9
// except according to those terms.
10
10
11
+ pub use sys:: cloudabi:: shims:: args:: * ;
12
+
11
13
#[ allow( dead_code) ]
12
14
pub fn init ( _: isize , _: * const * const u8 ) { }
13
15
Original file line number Diff line number Diff line change @@ -34,6 +34,9 @@ pub mod time;
34
34
35
35
mod abi;
36
36
37
+ mod shims;
38
+ pub use self :: shims:: * ;
39
+
37
40
#[ allow( dead_code) ]
38
41
pub fn init ( ) { }
39
42
Original file line number Diff line number Diff line change @@ -12,6 +12,8 @@ use ffi::CStr;
12
12
use libc:: { self , c_int} ;
13
13
use str;
14
14
15
+ pub use sys:: cloudabi:: shims:: os:: * ;
16
+
15
17
pub fn errno ( ) -> i32 {
16
18
extern "C" {
17
19
#[ thread_local]
@@ -29,3 +31,7 @@ pub fn error_string(errno: i32) -> String {
29
31
. unwrap ( )
30
32
. to_owned ( )
31
33
}
34
+
35
+ pub fn exit ( code : i32 ) -> ! {
36
+ unsafe { libc:: exit ( code as c_int ) }
37
+ }
Original file line number Diff line number Diff line change
1
+ // Copyright 2018 The Rust Project Developers. See the COPYRIGHT
2
+ // file at the top-level directory of this distribution and at
3
+ // http://rust-lang.org/COPYRIGHT.
4
+ //
5
+ // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6
+ // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7
+ // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8
+ // option. This file may not be copied, modified, or distributed
9
+ // except according to those terms.
10
+
11
+ use ffi:: OsString ;
12
+
13
+ pub struct Args ( ( ) ) ;
14
+
15
+ impl Args {
16
+ pub fn inner_debug ( & self ) -> & [ OsString ] {
17
+ & [ ]
18
+ }
19
+ }
20
+
21
+ impl Iterator for Args {
22
+ type Item = OsString ;
23
+ fn next ( & mut self ) -> Option < OsString > {
24
+ None
25
+ }
26
+ fn size_hint ( & self ) -> ( usize , Option < usize > ) {
27
+ ( 0 , Some ( 0 ) )
28
+ }
29
+ }
30
+
31
+ impl ExactSizeIterator for Args {
32
+ fn len ( & self ) -> usize {
33
+ 0
34
+ }
35
+ }
36
+
37
+ impl DoubleEndedIterator for Args {
38
+ fn next_back ( & mut self ) -> Option < OsString > {
39
+ None
40
+ }
41
+ }
42
+
43
+ pub fn args ( ) -> Args {
44
+ Args ( ( ) )
45
+ }
Original file line number Diff line number Diff line change
1
+ // Copyright 2018 The Rust Project Developers. See the COPYRIGHT
2
+ // file at the top-level directory of this distribution and at
3
+ // http://rust-lang.org/COPYRIGHT.
4
+ //
5
+ // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6
+ // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7
+ // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8
+ // option. This file may not be copied, modified, or distributed
9
+ // except according to those terms.
10
+
11
+ pub mod os {
12
+ pub const FAMILY : & ' static str = "cloudabi" ;
13
+ pub const OS : & ' static str = "cloudabi" ;
14
+ pub const DLL_PREFIX : & ' static str = "lib" ;
15
+ pub const DLL_SUFFIX : & ' static str = ".so" ;
16
+ pub const DLL_EXTENSION : & ' static str = "so" ;
17
+ pub const EXE_SUFFIX : & ' static str = "" ;
18
+ pub const EXE_EXTENSION : & ' static str = "" ;
19
+ }
You can’t perform that action at this time.
0 commit comments