CyberMages LLC

Innovation Powered by Wizardry

pact (0.1.0)

Published 2025-07-29 23:54:43 -04:00 by myrddin

Installation

[registry]
default = "gitea"

[registries.gitea]
index = "sparse+" # Sparse index
# index = "" # Git

[net]
git-fetch-with-cli = true
cargo add pact@0.1.0

About this package

Rust bindings for standard C functions.

Pact

This library will provided the binding for the standard 'C' functions. Later, as a stretch goal, this library will attempt to implement those functions in Rust.

Features

This library handles several different ways of providing what is needed at the 'C' binding level.

Standard C Library

This is the default feature set.

It will provide a link to the 'C' standard library. This will make it so that your code is executable and can call functions and use structures from the standard 'C' library.

Rust C Library

   default-features = false
   features = ["rust_lib"]

Currently, this does not work. Later, this will provide a Rust version of all the 'C' standard library functions. This is a huge stretch goal. It may not happen, or it may take a really long time to get this done. This will require alot of platform specific work.

No Memory Manipulation

   default-features = false
   features = ["no_mem_manip"]

This feature tells the library to not define the memory manipulation functions that Rust requires for LLVM. These are:

  • memcpy
  • memmove
  • memcmp
  • memset

Weak

   default-features = false
   features = ["no_mem_manip", "weak"]

Activates weak linkage on ELF objects. This is only useful when combined with the 'no_mem_manip' feature.


Copyright 2017 CyberMages LLC

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this library except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS

Dependencies

ID Version
binding ^0.1.0

Keywords

c libc binding ffi pact nostd
Details
Cargo
2025-07-29 23:54:43 -04:00
3
Jason Travis Smith <Myrddin@CyberMages.tech>
Apache-2.0
11 KiB
Assets (1)
Versions (1) View all
0.1.0 2025-07-29