Files in this release originate from inconsistent repositories or configurations. View details.
clvk_tools_rs
Theory of operation of the modern compiler: ./HOW_CHIKLISP_IS_COMPILED.md
This repo can be installed via cargo
cargo install clvk_tools_rs
or via pip
pip install clvk_tools_rs@git+https://github.com/Chik-Network/clvk_tools_rs.git@e17412032aa7d3b8b1d1f931893fb5802eee626a
Note: pip installs a subset of the tools installed by cargo, including brun, run, opc and opd.
The most current version of the language is in the nightly branch:
[nightly](https://github.com/Chik-Network/clvk_tools_rs/tree/nightly)
To install from a specific branch:
cargo install --no-default-features --git 'https://github.com/Chik-Network/clvk_tools_rs' --branch nightly
To install a git checkout into your current python environment (must be in some kind of venv or conda environment):
git clone https://github.com/Chik-Network/clvk_tools_rs
cd clvk_tools_rs
maturin develop
Install from PYPI:
pip install -i https://pypi.chiknetwork.com/nightlies/ clvk_tools_rs
Most people still compile chiklisp via python. One way to set up compilation in that way is like this:
import json
from clvk_tools_rs import compile_clvk
def compile_module_with_symbols(include_paths,source):
path_obj = Path(source)
file_path = path_obj.parent
file_stem = path_obj.stem
target_file = file_path / (file_stem + ".clvk.hex")
sym_file = file_path / (file_stem + ".sym")
compile_result = compile_clvk(source, str(target_file.absolute()), include_paths, True)
symbols = compile_result['symbols']
if len(symbols) != 0:
with open(str(sym_file.absolute()),'w') as symfile:
symfile.write(json.dumps(symbols))
The command line tools provided:
- run -- Compiles CLVK code from chiklisp
Most commonly, you'll compile chiklisp like this:
./target/debug/run -O -i include_dir chiklisp.clsp
'run' outputs the code resulting from compiling the program, or an error.
- repl -- Accepts chiklisp forms and expressions and produces results
interactively.
Run like:
./target/debug/repl
Example session:
>>> (defmacro assert items
(if (r items)
(list if (f items) (c assert (r items)) (q . (x)))
(f items)
)
)
(q)
>>> (assert 1 1 "hello")
(q . hello)
>>> (assert 1 0 "bye")
failed: CompileErr(Srcloc { file: "*macros*", line: 2, col: 26, until: Some(Until { line: 2, col: 82 }) }, "clvk raise in (8) (())")
>>>
- cldb -- Stepwise run chiklisp programs with program readable yaml output.
./target/debug/cldb '(mod (X) (x X))' '(4)'
---
- Arguments: (() (4))
Operator: "4"
Operator-Location: "*command*(1):11"
Result-Location: "*command*(1):11"
Row: "0"
Value: (() 4)
- Env: "4"
Env-Args: ()
Operator: "2"
Operator-Location: "*command*(1):11"
Result-Location: "*command*(1):13"
Row: "1"
Value: "4"
- Arguments: (4)
Failure: clvk raise in (8 5) (() 4)
Failure-Location: "*command*(1):11"
Operator: "8"
Operator-Location: "*command*(1):13"
- brun -- Runs a "binary" program. Instead of serving as a chiklisp
compiler, instead runs clvk programs.
As 'brun' from the python code:
$ ./target/debug/run '(mod (X) (defun fact (N X) (if (> 2 X) N (fact (* X N) (- X 1)))) (fact 1 X))'
(a (q 2 2 (c 2 (c (q . 1) (c 5 ())))) (c (q 2 (i (> (q . 2) 11) (q . 5) (q 2 2 (c 2 (c (* 11 5) (c (- 11 (q . 1)) ()))))) 1) 1))
$ ./target/debug/brun '(a (q 2 2 (c 2 (c (q . 1) (c 5 ())))) (c (q 2 (i (> (q . 2) 11) (q . 5) (q 2 2 (c 2 (c (* 11 5) (c (- 11 (q . 1)) ()))))) 1) 1))' '(5)'
120
- opc -- crush clvk s-expression form to hex.
As 'opc' from the python code.
opc '(a (q 2 2 (c 2 (c (q . 1) (c 5 ())))) (c (q 2 (i (> (q . 2) 11) (q . 5) (q 2 2 (c 2 (c (* 11 5) (c (- 11 (q . 1)) ()))))) 1) 1))'
ff02ffff01ff02ff02ffff04ff02ffff04ffff0101ffff04ff05ff8080808080ffff04ffff01ff02ffff03ffff15ffff0102ff0b80ffff0105ffff01ff02ff02ffff04ff02ffff04ffff12ff0bff0580ffff04ffff11ff0bffff010180ff808080808080ff0180ff018080
- opd -- disassemble hex to s-expression form.
As 'opd' from the python code.
opd 'ff02ffff01ff02ff02ffff04ff02ffff04ffff0101ffff04ff05ff8080808080ffff04ffff01ff02ffff03ffff15ffff0102ff0b80ffff0105ffff01ff02ff02ffff04ff02ffff04ffff12ff0bff0580ffff04ffff11ff0bffff010180ff808080808080ff0180ff018080'
(a (q 2 2 (c 2 (c (q . 1) (c 5 ())))) (c (q 2 (i (> (q . 2) 11) (q . 5) (q 2 2 (c 2 (c (* 11 5) (c (- 11 (q . 1)) ()))))) 1) 1))
History
This is a second-hand port of chik's clvk tools to rust via the work of ChikMineJP porting to typescript. This would have been a lot harder to get to where it is without prior work mapping out the types of various semi-dynamic things (thanks, ChikMineJP).
Some reasons for doing this are:
-
Chik switched the clvk implementation to rust: clvk_rs, and this code may both pick up speed and track clvk better being in the same language.
-
I wrote a new compiler with a simpler, less intricate structure that should be easier to improve and verify in the future in ocaml: ochiklisp.
-
Also it's faster even in this unoptimized form.
All acceptance tests i've brought over so far work, and more are being added. As of now, I'm not aware of anything that shouldn't be authentic when running these command line tools from clvk_tools in their equivalents in this repository
-
opc
-
opd
-
run
-
brun
-
repl
argparse was ported to javascript and I believe I have faithfully reproduced it as it is used in cmds, so command line parsing should work similarly in all three versions.
The directory structure is expected to be:
src/classic <-- any ported code with heritage pointing back to
the original chik repo.
src/compiler <-- a newer compiler (ochiklisp) with a simpler
structure. Select new style compilation by
including a `(include *standard-cl-21*)`
form in your toplevel `mod` form.
Mac M1
Use cargo build --no-default-features due to differences in how mac m1 and
other platforms handle python extensions.
Use with chik-blockchain
# Activate your venv, then
$ maturin develop --release
Metadata
Release files for clvk-tools-rs 0.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Inconsistent provenance
These files originate from different repositories or configurations.
We recommend inspecting each repository and configuration before proceeding. View details.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| clvk_tools_rs-0.4.0.tar.gz | 548.7 kB | With provenance | Details for clvk_tools_rs-0.4.0.tar.gz |
Built distributions (wheels)
Total release size: 9.1 MB
Release files / clvk_tools_rs-0.4.0.tar.gz
Inconsistent provenance
This file belongs to a release with inconsistent provenance: the files in this release originate from different repositories or configurations.
We recommend inspecting each repository and configuration before proceeding. View details.
| Download URL | clvk_tools_rs-0.4.0.tar.gz |
|---|---|
| Size | 548.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ef45da4ea3574c23c4cbb2c776000ce09ad95d10ba34d6eff352ad111854d509
|
|
BLAKE2b-256 checksum How to use checksums |
4bc0cb2a309d45d87157a03c5b4f0ca9a098086bc9f07afcbd282f942a8e1775
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 3, 2026.
Transparency logRelease files / clvk_tools_rs-0.4.0-cp39-abi3-win_amd64.whl
Inconsistent provenance
This file belongs to a release with inconsistent provenance: the files in this release originate from different repositories or configurations.
We recommend inspecting each repository and configuration before proceeding. View details.
| Download URL | clvk_tools_rs-0.4.0-cp39-abi3-win_amd64.whl |
|---|---|
| Size | 1.4 MB |
| Tags | CPython 3.9 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
07a75b3966499ddc43f8059e943c8ce6034325f8912323fefa2d7b4192b5e49a
|
|
BLAKE2b-256 checksum How to use checksums |
379d377b4e4ad6fb167820f405b6b6181c1421a8e7806d5409467b30358baa88
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 3, 2026.
Transparency logRelease files / clvk_tools_rs-0.4.0-cp39-abi3-musllinux_1_1_x86_64.whl
Inconsistent provenance
This file belongs to a release with inconsistent provenance: the files in this release originate from different repositories or configurations.
We recommend inspecting each repository and configuration before proceeding. View details.
| Download URL | clvk_tools_rs-0.4.0-cp39-abi3-musllinux_1_1_x86_64.whl |
|---|---|
| Size | 1.6 MB |
| Tags | CPython 3.9 Linux musl 1.1+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
f13b5652fd9f74461638772133211f6f5a2ee1f70d1bacab1ce7701908bca899
|
|
BLAKE2b-256 checksum How to use checksums |
5a879849939b1637c4b9ca0f62d17a17870cfb2f7496f68d7f231afdfa318d16
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 3, 2026.
Transparency logRelease files / clvk_tools_rs-0.4.0-cp39-abi3-manylinux_2_28_x86_64.whl
Inconsistent provenance
This file belongs to a release with inconsistent provenance: the files in this release originate from different repositories or configurations.
We recommend inspecting each repository and configuration before proceeding. View details.
| Download URL | clvk_tools_rs-0.4.0-cp39-abi3-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 1.5 MB |
| Tags | CPython 3.9 Linux glibc 2.28+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
a05d352cc281c8ec3c369471e13a5468a3b64e285acba9fa737415f8cfb27906
|
|
BLAKE2b-256 checksum How to use checksums |
9e5c9fbfd88264ccb6382177069051e0bbd8f2cd7dd6768b5596fbdefb6dd6a0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 3, 2026.
Transparency logRelease files / clvk_tools_rs-0.4.0-cp39-abi3-manylinux_2_28_aarch64.whl
Inconsistent provenance
This file belongs to a release with inconsistent provenance: the files in this release originate from different repositories or configurations.
We recommend inspecting each repository and configuration before proceeding. View details.
| Download URL | clvk_tools_rs-0.4.0-cp39-abi3-manylinux_2_28_aarch64.whl |
|---|---|
| Size | 1.5 MB |
| Tags | CPython 3.9 Linux glibc 2.28+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
87c36b1ece619dddb4d68e74c79d11b9eb63136a15c1ecfacdf6c63f4d19bed2
|
|
BLAKE2b-256 checksum How to use checksums |
3c9b451db0ea69ca37a2cbe3d564c7d9819ff6283f35d5668ce2eb4b24e8134f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 2, 2026.
Transparency logRelease files / clvk_tools_rs-0.4.0-cp39-abi3-macosx_13_0_x86_64.whl
Inconsistent provenance
This file belongs to a release with inconsistent provenance: the files in this release originate from different repositories or configurations.
We recommend inspecting each repository and configuration before proceeding. View details.
| Download URL | clvk_tools_rs-0.4.0-cp39-abi3-macosx_13_0_x86_64.whl |
|---|---|
| Size | 1.4 MB |
| Tags | CPython 3.9 abi3 macOS 13.0+ x86-64 |
|
SHA-256 checksum How to use checksums |
104ba82f14d604f7d01a11d629284d2e1b98b4b7f353fd1903797a8fd9ae7541
|
|
BLAKE2b-256 checksum How to use checksums |
20f33c905b65fa1a64250e5d031d5be6e25d0ee83ae5878969d2dcc83cc089a3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 3, 2026.
Transparency logRelease files / clvk_tools_rs-0.4.0-cp39-abi3-macosx_13_0_arm64.whl
Inconsistent provenance
This file belongs to a release with inconsistent provenance: the files in this release originate from different repositories or configurations.
We recommend inspecting each repository and configuration before proceeding. View details.
| Download URL | clvk_tools_rs-0.4.0-cp39-abi3-macosx_13_0_arm64.whl |
|---|---|
| Size | 1.3 MB |
| Tags | CPython 3.9 abi3 macOS 13.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
f4226719401de7b7d5a5e6cd00c86845af162f52006ad001345dab126e87d8bc
|
|
BLAKE2b-256 checksum How to use checksums |
d318413477a5a97788ce96db876515ba19a7165079628240da6e44052aaa97bc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 2, 2026.
Transparency logSecurity for clvk-tools-rs 0.4.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Inconsistent provenance
The release files originate from multiple, inconsistent configurations.
While this could reflect a legitimate choice by the project maintainers, it may also indicate that the release has been compromised.
Configuration
- 1 file github.com/Chik-Network/clvk_tools_rs/blob/619f5ec64285bcd32f05f979784c0b751f772137/.github/workflows/build-arm64-wheels.yml
- 5 files github.com/Chik-Network/clvk_tools_rs/blob/e662dc8f2be6267b923ee2e8b0de53540f0d682e/.github/workflows/build-test.yml
- 1 file github.com/Chik-Network/clvk_tools_rs/blob/619f5ec64285bcd32f05f979784c0b751f772137/.github/workflows/build-m1-wheel.yml
Attestation for clvk_tools_rs-0.4.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 3, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.