diff --git a/book/src/SUMMARY.md b/book/src/SUMMARY.md index f0ccfe30..3502ccf2 100644 --- a/book/src/SUMMARY.md +++ b/book/src/SUMMARY.md @@ -3,6 +3,8 @@ [halo2](README.md) - [Concepts](concepts.md) - [User Documentation](user.md) + - [A simple example](user/simple-example.md) + - [Lookup tables](user/lookup-tables.md) - [Gadgets](user/gadgets.md) - [Tips and tricks](user/tips-and-tricks.md) - [Design](design.md) diff --git a/book/src/user.md b/book/src/user.md index 3a51d9a2..c13533a5 100644 --- a/book/src/user.md +++ b/book/src/user.md @@ -1 +1,5 @@ # User Documentation + +You're probably here because you want to write circuits? Excellent! + +This section will guide you through the process of creating circuits with halo2. diff --git a/book/src/user/lookup-tables.md b/book/src/user/lookup-tables.md new file mode 100644 index 00000000..25e60e97 --- /dev/null +++ b/book/src/user/lookup-tables.md @@ -0,0 +1,7 @@ +# Lookup tables + +In normal programs, you can trade memory for CPU to improve performance, by pre-computing +and storing lookup tables for some part of the computation. We can do the same thing in +halo2 circuits! + +TODO diff --git a/book/src/user/simple-example.md b/book/src/user/simple-example.md new file mode 100644 index 00000000..20ecbee9 --- /dev/null +++ b/book/src/user/simple-example.md @@ -0,0 +1,19 @@ +# A simple example + +Let's start with a simple circuit, to introduce you to the common APIs and how they are +used. The circuit will take a public input $c$, and will prove knowledge of two private +inputs $a$ and $b$ such that + +$$a * b = c.$$ + +```rust +# extern crate halo2; +use halo2::arithmetic::FieldExt; + +struct MyCircuit { + a: F, + b: F, +} +``` + +TODO