Cargo Features

[dependencies]
c-gull = { version = "0.20.2", default-features = false, features = ["std", "thread", "call-main", "log", "atomic-dbg-logger", "env_logger", "max_level_off", "experimental-relocate", "eyra", "take-charge", "coexist-with-libc", "malloc-via-rust-global-alloc", "malloc-via-crates", "threadsafe-setenv", "todo", "deprecated-and-unimplemented", "eh-personality", "eh-personality-continue", "panic-handler", "panic-handler-trap", "global-allocator", "extra-syscalls"] }
default = coexist-with-libc, std, thread, threadsafe-setenv

These default features are set whenever c-gull is added without default-features = false somewhere in the dependency tree.

std default

Enables std of c-scape, errno, rustix, and tz-rs

rustix:

This enables use of std. Disabling this enables #![no_std], and requires Rust 1.64 or newer.

thread default

Enables thread of c-scape

call-main

In "take-charge" mode, this enables code in c-scape to define the origin_start function documented here and call a C ABI-compatible extern main function.

Enables call-main of c-scape

log

Enable logging of program and thread startup and shutdown.

Enables log of c-scape

atomic-dbg-logger

Install atomic_dbg::log as a logger.

Enables atomic-dbg-logger of c-scape

env_logger

Install the env_logger crate as a logger.

Enables env_logger of c-scape

max_level_off

Disable logging.

Enables max_level_off of c-scape

experimental-relocate

Enable highly experimental support for performing startup-time relocations,
needed to support statically-linked PIE executables.

Enables experimental-relocate of c-scape

eyra

A feature that pulls in all the individual features needed to use c-gull to write Rust programs completely implemented in Rust.

Enables eyra of c-scape

take-charge

One of the following two features must be enabled:

Enable this to tell c-gull to take control of the process.

Enables take-charge of c-scape

coexist-with-libc default

Enable this to tell c-gull to let a libc be in control of the process.

Enables coexist-with-libc of c-scape

malloc-via-rust-global-alloc

One of the following two features must be enabled:

Enable this to implement malloc using Rust's global allocator.

Enables malloc-via-rust-global-alloc of c-scape

malloc-via-crates

Enable this to implement malloc using third-party crates, which is useful to do when using the Rust global allocator is using malloc.

Enables malloc-via-crates of c-scape

threadsafe-setenv default

This makes setenv and friends thread-safe by leaking memory.

Enables threadsafe-setenv of c-scape

todo

Enable todo!() stubs for not-yet-implemented functions.

Enables todo of c-scape

deprecated-and-unimplemented

Enable unimplemented!() stubs for deprecated functions.

Enables deprecated-and-unimplemented of c-scape

eh-personality

Provide a #[lang = eh_personality] function suitable for unwinding (for no-std).

If you know your program never unwinds and want smaller code size, use "eh-personality-continue" instead.

This is only needed in no-std builds, as std provides a personality. See the "personality" feature of the unwinding crate for more details.

Enables eh-personality of c-scape

eh-personality-continue

Provide a #[lang = eh_personality] function that just returns CONTINUE_UNWIND (for no-std). Use this if you know your program will never unwind and don't want any extra code.

Enables eh-personality-continue of c-scape

panic-handler

Provide a #[panic_handler] function suitable for unwinding (for no-std).

If you know your program never panics and want smaller code size, use "panic-handler-trap" instead.

This is only needed in no-std builds, as std provides a panic handler. See the "panic-handler" feature of the unwinding crate for more details.

Enables panic-handler of c-scape

panic-handler-trap

Provide a #[panic_handler] function that just traps (for no-std). Use this if you know your program will never panic and don't want any extra code.

Enables panic-handler-trap of c-scape

global-allocator

Provide a #[global_allocator] function (for no-std).

This is only needed in no-std builds, as std provides a global allocator. Alternatively, you can define the global allocator manually; see the example-crates/custom-allocator example.

Enables global-allocator of c-scape

extra-syscalls

This extends the syscall function with suppport for more syscalls. This is not enabled by default because it increases the code size of syscall by several kibibytes and isn't needed by most Rust programs.

Enables extra-syscalls of c-scape

Features from optional dependencies

In crates that don't use the dep: syntax, optional dependencies automatically become Cargo features. These features may have been created by mistake, and this functionality may be removed in the future.

errno std
tz-rs std
rustix std