https://github.com/doumanash/c-main
C Style entry point for Rust
https://github.com/doumanash/c-main
Last synced: about 2 months ago
JSON representation
C Style entry point for Rust
- Host: GitHub
- URL: https://github.com/doumanash/c-main
- Owner: DoumanAsh
- License: bsl-1.0
- Created: 2023-03-14T14:01:54.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2023-03-14T14:22:10.000Z (about 2 years ago)
- Last Synced: 2025-03-30T17:45:28.683Z (2 months ago)
- Language: Rust
- Size: 3.91 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# c-main

[](https://crates.io/crates/c-main)
[](https://docs.rs/crate/c-main/)Utility crate providing c-main style arguments by using C main function.
## Usage
```rust
#![no_main]#[no_mangle]
pub fn rust_main(args: c_main::Args) -> isize {
for arg in args.into_iter().skip(1) {
println!("arg={:?}", arg);
}
0
}
```