Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: more context on boa usage and examples #181

Merged
merged 21 commits into from
Apr 11, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 30 additions & 6 deletions docs/source/api.rst
Original file line number Diff line number Diff line change
@@ -1,24 +1,48 @@
Getting started
===============
Overview
--------

A Vyper interpreter with pretty tracebacks, forking, debugging features and more! Titanoboa's goal is to provide a modern, advanced and integrated development experience for vyper users.
Titanoboa (also called boa) is a Vyper interpreter with pretty tracebacks, forking, debugging features and more! Titanoboa's goal is to provide a modern, advanced and integrated development experience for vyper users.

Unlike foundry, Titanoboa is not a framework, but a library that can be used in any python environment. It is designed to be used in Jupyter notebooks, python scripts, or tests (any python testing framework is compatible) to provide a seamless experience and give the illusion that python and vyper are the same language.
Unlike foundry, Titanoboa is not just a framework, but a library that can be used in any python environment. It is designed to be used in jupyter notebooks, Python scripts, or tests (any Python testing framework is compatible) to provide a seamless experience and give the illusion that python and vyper are the same language.

AlbertoCentonze marked this conversation as resolved.
Show resolved Hide resolved
Architecture
------------
Titanoboa achieves feature parity with the vyper compiler while providing an interpreted experience.

Internally, titanoboa uses vyper as a library to compile source code to bytecode, and then runs the bytecode using py-evm, adding instrumenting hooks to provide introspection. The use of py-evm means that the entire experience is highly configurable, down to the ability to patch opcodes and precompiles at the EVM level.

Installation
------------
Getting started
===============

Installing Titanoboa
--------------------

Titanoboa can be installed using pip:

.. code-block:: bash
pip install titanoboa

If you want to install the latest development version:

.. code-block:: bash
pip install git+https://github.com/vyperlang/titanoboa

Alternatively if you are using poetry:

.. code-block:: bash
poetry add titanoboa

If you want to use a specific version you can customize the dependency in your `pyproject.toml` file like this:

.. code-block:: toml
[tool.poetry.dependencies]
titanoboa = { git = "https://github.com/vyperlang/titanoboa.git", rev = <commit hash> }

Titanoboa by Examples
---------------------

TODO

API Reference
=============

Expand Down
4 changes: 4 additions & 0 deletions docs/source/coverage.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
Using Coverage
==============

Note

If fast mode is enabled coverage will not work.

Titanoboa offers coverage through the `coverage.py <https://coverage.readthedocs.io/>`_ package.

To use, add the following to ``.coveragerc``:
Expand Down
Loading