xref: /dragonos-dsc/src/lib.rs (revision 5c204289b8219b674a49231d69289644c323631c)
1 //! # dsc - DragonOS Raw Syscall Binding
2 //!
3 //! This is a raw syscall binding for DragonOS. It is not meant to be used directly, but rather as a dependency for other crates.
4 //!
5 //! ## Usage
6 //!
7 //! Add this to your `Cargo.toml`:
8 //!
9 //! ```toml
10 //! [dependencies]
11 //! dsc = { git = "https://github.com/DragonOS-Community/dsc.git" , rev = "The Git Commit You Want" }
12 //! ```
13 //!
14 //! ## 其他
15 //!
16 //! 如果您正在开发dsc,请您在引入dsc的库的`Cargo.toml`中添加如下内容,而不是使用上述的代码:
17 //!
18 //! ```toml
19 //! [dependencies]
20 //! dsc = { path = "您本地存放dsc的源代码的路径" }
21 //! ```
22 //!
23 //! ## How to build
24 //!
25 //! ```bash
26 //! ARCH=x86_64 && cargo build -Zbuild-std --release --target src/platform/$ARCH/target.json
27 //! ```
28 //!
29 //! ## How to build docs
30 //!
31 //! ```bash
32 //! ARCH=x86_64 && cargo doc -Zbuild-std --release --target src/platform/$ARCH/target.json
33 //! ```
34 //!
35 //! ## What is DragonOS?
36 //!
37 //! DragonOS is an opensource operating system developed for the server field.
38 //! Its kernel and user mode environment are developed from scratch, and provides Linux compatibility.
39 //!
40 //! - [DragonOS Website](https://dragonos.org)
41 //! - [DragonOS Github](https://github.com/DragonOS-Community)
42 //!
43 //! ## License
44 //!
45 //! Licensed under
46 //!   * MIT license (<http://opensource.org/licenses/MIT>)
47 
48 #![allow(deprecated)] // llvm_asm!
49 #![deny(warnings)]
50 #![no_std]
51 #![cfg_attr(any(
52     target_arch = "arm",
53     target_arch = "mips",
54     target_arch = "mips64",
55     target_arch = "powerpc",
56     target_arch = "powerpc64",
57     target_arch = "sparc64",
58     target_arch = "x86"
59 ), feature(llvm_asm))]
60 
61 #[cfg(test)]
62 extern crate std;
63 
64 pub use platform::*;
65 
66 pub (crate) mod macros;
67 
68 
69 #[cfg(all(any(target_os = "dragonos"),
70           target_arch = "x86_64"))]
71 #[path="platform/x86_64/mod.rs"]
72 pub mod platform;
73