-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rust: documentation and release pipelines (#130)
* Start to clean up Rust docs * Update CI * Update release action (needs testing) * Sketch docs * Add non-working link * Clean up some docs, un-mark Rng as send/sync * Re-mark rng as send+sync * cargo fmt * three languages -> four * Improve rust API docs * Capitalization fixes * Consistency edits * Update ffi.rst * Typo fixes * Update README for Rust example * Add section about STAN_THREADS to rust docs * Add how to run the example --------- Co-authored-by: Adrian Seyboldt <adrian.seyboldt@gmail.com>
- Loading branch information
Showing
11 changed files
with
205 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
Rust Interface | ||
============== | ||
|
||
`See the BridgeStan Crate documentation on docs.rs <https://docs.rs/bridgestan>`__ | ||
|
||
---- | ||
|
||
Installation | ||
------------ | ||
|
||
The BridgeStan Rust client is available on `crates.io <https://crates.io/crates/bridgestan>`__ and via ``cargo``: | ||
|
||
.. code-block:: shell | ||
cargo add bridgestan | ||
To build and use BridgeStan models, a copy of the BridgeStan C++ source code | ||
is required. Please follow the :doc:`Getting Started guide <../getting-started>` | ||
or use the Rust client in tandem with an interface such as :doc:`Python <./python>` | ||
which automates this process. | ||
|
||
``STAN_THREADS=true`` needs to be specified when compiling a model, for more | ||
details see the `API reference <https://docs.rs/bridgestan>`__. | ||
|
||
Example Program | ||
--------------- | ||
|
||
An example program is provided alongside the Rust crate in ``examples/example.rs``: | ||
|
||
.. raw:: html | ||
|
||
<details> | ||
<summary><a>Show example.rs</a></summary> | ||
|
||
|
||
.. literalinclude:: ../../rust/examples/example.rs | ||
:language: Rust | ||
|
||
.. raw:: html | ||
|
||
</details> | ||
|
||
|
||
API Reference | ||
------------- | ||
|
||
See docs.rs for the full API reference: `<https://docs.rs/bridgestan>`__ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.