Skip to content

Commit

Permalink
Merge pull request #47 from wravery/dev
Browse files Browse the repository at this point in the history
fix(doc): move crate doc comments into README files
  • Loading branch information
wravery authored Feb 7, 2025
2 parents 2776184 + 67c88ef commit c819630
Show file tree
Hide file tree
Showing 12 changed files with 52 additions and 35 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions cef/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# cef

Use the [Chromium Embedded Framework](https://github.com/chromiumembedded/cef) in Rust.
4 changes: 1 addition & 3 deletions cef/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
//! # cef
//!
//! Use the [Chromium Embedded Framework](https://github.com/chromiumembedded/cef) in Rust.
#![doc = include_str!("../README.md")]

pub mod args;
pub mod rc;
Expand Down
2 changes: 1 addition & 1 deletion download-cef/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "download-cef"
description = "Download and extract pre-built CEF (Chromium Embedded Framework) archives."
version = "1.2.1"
version = "1.2.2"

edition.workspace = true
license.workspace = true
Expand Down
4 changes: 4 additions & 0 deletions download-cef/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# download-cef

Utility functions to download and extract prebuilt [Chromium Embedded Framework](https://github.com/chromiumembedded/cef)
archives on any supported platform.
5 changes: 1 addition & 4 deletions download-cef/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
//! # download-cef
//!
//! Utility functions to download and extract prebuilt [Chromium Embedded Framework](https://github.com/chromiumembedded/cef)
//! archives on any supported platform.
#![doc = include_str!("../README.md")]

use bzip2::bufread::BzDecoder;
use serde::{Deserialize, Serialize};
Expand Down
28 changes: 28 additions & 0 deletions export-cef-dir/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# export-cef-dir

Export files from the prebuilt [Chromium Embedded Framework](https://github.com/chromiumembedded/cef)
archive on any supported platform. The structure of the exported directory matches the way that
the `cef-dll-sys` crate expects to see them.

To use the target directory when building, set the `CEF_PATH` environment variable to the path of the
exported directory, e.g., `~/.local/share/cef`.

To use the DLLs in this directory at runtime, the library loader path varies by platform:

- Linux

```sh
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$CEF_PATH"
```

- macOS

```sh
export DYLD_FALLBACK_LIBRARY_PATH="$DYLD_FALLBACK_LIBRARY_PATH:$CEF_PATH"
```

- Windows (using PowerShell)

```pwsh
$env:PATH = "$env:PATH;$env:CEF_PATH"
```
23 changes: 1 addition & 22 deletions export-cef-dir/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,25 +1,4 @@
//! # export-cef-dir
//!
//! Export files from the prebuilt [Chromium Embedded Framework](https://github.com/chromiumembedded/cef)
//! archive on any supported platform. The structure of the exported directory matches the way that
//! the `cef-dll-sys` crate expects to see them.
//!
//! To use the target directory when building, set the `CEF_PATH` environment variable to the path of the
//! exported directory, e.g., `~/.local/share/cef`.
//!
//! To use the DLLs in this directory at runtime, the library loader path varies by platform:
//! - Linux
//! ```sh
//! export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$CEF_PATH"
//! ```
//! - macOS
//! ```sh
//! export DYLD_FALLBACK_LIBRARY_PATH="$DYLD_FALLBACK_LIBRARY_PATH:$CEF_PATH"
//! ```
//! - Windows (using PowerShell)
//! ```pwsh
//! $env:PATH = "$env:PATH;$env:CEF_PATH"
//! ```
#![doc = include_str!("../README.md")]

use clap::Parser;
use download_cef::{CefIndex, OsAndArch};
Expand Down
4 changes: 4 additions & 0 deletions sys/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# cef-dll-sys

Generated bindings for the prebuilt [Chromium Embedded Framework](https://github.com/chromiumembedded/cef)
C API on any supported platform.
5 changes: 1 addition & 4 deletions sys/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
//! # cef-dll-sys
//!
//! Generated bindings for the prebuilt [Chromium Embedded Framework](https://github.com/chromiumembedded/cef)
//! C API on any supported platform.
#![doc = include_str!("../README.md")]

#[allow(
non_snake_case,
Expand Down
5 changes: 5 additions & 0 deletions update-bindings/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# update-bindings

Download the prebuilt [Chromium Embedded Framework](https://github.com/chromiumembedded/cef)
archive on any supported platform and run `bindgen` on the C API for the `cef-dll-sys` crate,
then regenerate the safe bindings in the `cef` crate.
2 changes: 2 additions & 0 deletions update-bindings/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![doc = include_str!("../README.md")]

#[macro_use]
extern crate thiserror;

Expand Down

0 comments on commit c819630

Please sign in to comment.