Skip to content

Commit

Permalink
Minor elaborations on docs, squash gitignores
Browse files Browse the repository at this point in the history
  • Loading branch information
ZackPierce committed May 21, 2018
1 parent e1cfddd commit f7f3ce1
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 15 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
*.idea
**/*.rs.bk
*.swp
target
Cargo.lock
28 changes: 17 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
# libsel4-sys

Builds the sel4 kernel and generates bindings around it,
Builds the sel4 kernel and generates Rust bindings around it,
as configured by a fel4 manifest.

This library provides thin Rust bindings around the [seL4 codebase](https://github.com/seL4/seL4);
more idiomatic Rust wrappers for the enclosed functionality will be supplied in other crates.

Intended for use in projects managed by
[cargo fel4](https://github.com/PolySync/cargo-fel4), see that repository
for introductory materials.

## Project Layout

```
libsel4-sys/
├── Cargo.toml
├── build.rs <-- Pulls in fel4 toml for CMake configuration
├── build.rs <-- Configures CMake with fel4 manifest data, runs CMake and bindgen
├── CMakeLists.txt
├── deps <-- submodules to seL4 repositories
│   ├── musllibc
Expand All @@ -17,29 +24,23 @@ libsel4-sys/
│   ├── seL4_tools
│   └── util_libs
├── package
│   └── CMakeLists.txt <-- custom CMake script to build seL4 artifacts
│   └── CMakeLists.txt <-- custom CMake script wrapper to build seL4 artifacts
├── README.md
├── res
│   └── bindgen_wrapper.h
├── src
│   └── lib.rs
│   └── lib.rs <-- thin wrapper around the generated bindings
└── Xargo.toml
```

## Down-stream Configuration

Down-stream consumers can specify a toml file that contains the CMake configuration
tables via the `FEL4_MANIFEST_PATH` variable.

## Building

Don't forget to run `git submodule update --init` to pull in the seL4 related dependencies
before you start hacking.
to the local filesystem before attempting a build.

This project is intended to be built in the context of the `cargo fel4` command, which manages
the piping of key environment variables relevant to the downstream project.


Builds require that the `FEL4_MANIFEST_PATH` environment variable is set and
includes a path that points to a valid fel4.toml file, as specified by the `fel4-config`
crate.
Expand All @@ -53,6 +54,11 @@ RUST_TARGET_PATH=$PWD/test_configs FEL4_MANIFEST_PATH=$PWD/test_configs/fel4.tom

## Output Artifacts

The generated bindings should be treated as relatively ephemeral and dynamic compared
to most Rust libraries. The output is context-specific to the target (e.g. "arm-sel4-fel4")
and the set of configuration
flags derived from the input fel4 manifest file.

If environment variable `FEL4_ARTIFACT_PATH` is set, the kernel and simulation script
will be copied into the directory specified by the variable.

Expand Down
3 changes: 0 additions & 3 deletions libsel4-sys/.gitignore

This file was deleted.

6 changes: 5 additions & 1 deletion test_configs/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
## fel4.toml
An example fel4 manifest that could be used to configure
the build of libsel4-sys
the build of libsel4-sys. See the [fel4-config repository](https://github.com/PolySync/fel4-config)
for more information about the fel4 manifest format.

## feL4-targets JSON files
Example Rust target specifications for feL4.
Note that these are for reference only, and the primary source of truth
for supported target specifications can be found in the
[cargo-fel4 repository](https://github.com/PolySync/cargo-fel4).

0 comments on commit f7f3ce1

Please sign in to comment.