Fixed the memory functions required for LLVM to properly work.

This required the fixing of the features section to properly handle
passing on the use_std feature. It also required that the memory functions
were moved to the main library module instead of within the rust module
as was previously desired. The C module then correctly skips defining the
external C library functions.

Basic time functionality was also added.
This commit is contained in:
2017-03-01 19:05:36 -05:00
parent 102713417d
commit 89e37b017b
8 changed files with 371 additions and 6 deletions

View File

@ -1,3 +1,58 @@
# C #
This library will provided binding for the standard C functions. Later, as a
stretch goal, this library will attempt to implement those functions in Rust.
# 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. Or you can add:
```
default-features = false
features = ["c_lib"]
```
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
* memset
* memcmp
### 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.