├── .envrc ├── dhall ├── py.typed ├── __init__.py └── __init__.pyi ├── tests ├── relative_test │ ├── b.dhall │ └── a.dhall ├── test_samedir.py ├── test_relative.py ├── test_docs.py ├── test_known_bad_behaviour.py └── test_hypothesis.py ├── lint.sh ├── .github ├── workflows │ ├── schema.dhall │ ├── helpers.dhall │ ├── ci.dhall │ ├── builder.dhall │ └── ci.yml ├── FUNDING.yml └── dependabot.yml ├── .cargo └── config ├── shell.nix ├── LICENSE-MIT ├── Cargo.toml ├── Makefile ├── pyproject.toml ├── .gitignore ├── README.md ├── LICENSE-APACHE ├── src └── lib.rs └── Cargo.lock /.envrc: -------------------------------------------------------------------------------- 1 | use nix 2 | -------------------------------------------------------------------------------- /dhall/py.typed: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/relative_test/b.dhall: -------------------------------------------------------------------------------- 1 | ./a.dhall 2 | -------------------------------------------------------------------------------- /tests/relative_test/a.dhall: -------------------------------------------------------------------------------- 1 | "test_string!" 2 | -------------------------------------------------------------------------------- /lint.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | cargo fmt 4 | isort . 5 | black . 6 | -------------------------------------------------------------------------------- /.github/workflows/schema.dhall: -------------------------------------------------------------------------------- 1 | let helpers = ./helpers.dhall in helpers.GithubActions.Workflow.Type 2 | -------------------------------------------------------------------------------- /.cargo/config: -------------------------------------------------------------------------------- 1 | [target.x86_64-apple-darwin] 2 | rustflags = [ 3 | "-C", "link-arg=-undefined", 4 | "-C", "link-arg=dynamic_lookup", 5 | ] 6 | -------------------------------------------------------------------------------- /tests/test_samedir.py: -------------------------------------------------------------------------------- 1 | import os 2 | 3 | import dhall 4 | 5 | 6 | def test_samedir(): 7 | os.chdir(os.path.dirname(os.path.realpath(__file__)) + "/relative_test") 8 | with open("b.dhall") as f: 9 | assert dhall.load(f) == "test_string!" 10 | -------------------------------------------------------------------------------- /tests/test_relative.py: -------------------------------------------------------------------------------- 1 | import os 2 | 3 | import dhall 4 | 5 | 6 | def test_relative(): 7 | with open( 8 | os.path.dirname(os.path.realpath(__file__)) + "/relative_test/b.dhall" 9 | ) as f: 10 | assert dhall.load(f) == "test_string!" 11 | -------------------------------------------------------------------------------- /tests/test_docs.py: -------------------------------------------------------------------------------- 1 | import dhall 2 | 3 | 4 | def test_docs(): 5 | assert ( 6 | dhall.dumps({"keyA": 81, "keyB": True, "keyC": "value"}) 7 | == '{ keyA = 81, keyB = True, keyC = "value" }' 8 | ) 9 | assert dhall.loads("""{ keyA = 81, keyB = True, keyC = "value" }""") == { 10 | "keyA": 81, 11 | "keyB": True, 12 | "keyC": "value", 13 | } 14 | -------------------------------------------------------------------------------- /dhall/__init__.py: -------------------------------------------------------------------------------- 1 | import contextlib 2 | import os 3 | 4 | from . import dhall as _dhall 5 | from .dhall import __version__, dump, dumps, loads 6 | 7 | 8 | @contextlib.contextmanager 9 | def remember_cwd(): 10 | curdir = os.getcwd() 11 | try: 12 | yield 13 | finally: 14 | os.chdir(curdir) 15 | 16 | 17 | def load(fp): 18 | with remember_cwd(): 19 | newdir = os.path.dirname(fp.name) 20 | if newdir != "": 21 | os.chdir(newdir) 22 | return _dhall.load(fp) 23 | -------------------------------------------------------------------------------- /dhall/__init__.pyi: -------------------------------------------------------------------------------- 1 | # pyright: strict 2 | 3 | # based on github.com/python/typeshed/blob/master/stdlib/3/json/__init__.pyi 4 | 5 | from typing import IO, Any, Protocol, TypeVar, Union 6 | 7 | _T_co = TypeVar("_T_co", covariant=True) 8 | 9 | class SupportsRead(Protocol[_T_co]): 10 | def read(self, __length: int = ...) -> _T_co: ... 11 | @property 12 | def name(self) -> str: ... 13 | 14 | def dumps(obj: Any) -> str: ... 15 | def dump(obj: Any, fp: IO[str]) -> None: ... 16 | def loads(s: Union[str, bytes]) -> Any: ... 17 | def load(fp: SupportsRead[Union[str, bytes]]) -> Any: ... 18 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: [s-zeng] 4 | patreon: # Replace with a single Patreon username 5 | open_collective: # Replace with a single Open Collective username 6 | ko_fi: # Replace with a single Ko-fi username 7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel 8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry 9 | liberapay: # Replace with a single Liberapay username 10 | issuehunt: # Replace with a single IssueHunt username 11 | otechie: # Replace with a single Otechie username 12 | custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] 13 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | # To get started with Dependabot version updates, you'll need to specify which 2 | # package ecosystems to update and where the package manifests are located. 3 | # Please see the documentation for all configuration options: 4 | # https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates 5 | 6 | version: 2 7 | updates: 8 | 9 | # Maintain dependencies for GitHub Actions 10 | - package-ecosystem: "github-actions" 11 | directory: "/" 12 | schedule: 13 | interval: "daily" 14 | 15 | # Maintain dependencies for pip 16 | - package-ecosystem: "pip" 17 | directory: "/" 18 | schedule: 19 | interval: "daily" 20 | 21 | # Maintain dependencies for cargo 22 | - package-ecosystem: "cargo" 23 | directory: "/" 24 | schedule: 25 | interval: "daily" 26 | -------------------------------------------------------------------------------- /shell.nix: -------------------------------------------------------------------------------- 1 | { pkgs ? import (fetchTarball "https://github.com/NixOS/nixpkgs/archive/refs/tags/22.11.tar.gz") {} }: 2 | 3 | pkgs.mkShell { 4 | buildInputs = with pkgs; [ 5 | poetry 6 | rustc 7 | cargo 8 | darwin.apple_sdk.frameworks.Security 9 | pkgconfig 10 | openssl 11 | ]; 12 | packages = with pkgs; [ 13 | python310Packages.pytest 14 | black 15 | isort 16 | dhall 17 | dhall-json 18 | rust-analyzer 19 | ]; 20 | } 21 | # 22 | # let 23 | # myAppEnv = pkgs.poetry2nix.mkPoetryEnv { 24 | # projectDir = ./.; 25 | # editablePackageSources = { 26 | # my-app = ./src; 27 | # }; 28 | # }; 29 | # in myAppEnv.env.overrideAttrs (oldAttrs: { 30 | # buildInputs = [ 31 | # pkgs.rustc 32 | # pkgs.cargo 33 | # ]; 34 | # packages = [ 35 | # pkgs.python310Packages.pytest 36 | # pkgs.black 37 | # pkgs.isort 38 | # ]; 39 | # }) 40 | -------------------------------------------------------------------------------- /LICENSE-MIT: -------------------------------------------------------------------------------- 1 | Permission is hereby granted, free of charge, to any 2 | person obtaining a copy of this software and associated 3 | documentation files (the "Software"), to deal in the 4 | Software without restriction, including without 5 | limitation the rights to use, copy, modify, merge, 6 | publish, distribute, sublicense, and/or sell copies of 7 | the Software, and to permit persons to whom the Software 8 | is furnished to do so, subject to the following 9 | conditions: 10 | 11 | The above copyright notice and this permission notice 12 | shall be included in all copies or substantial portions 13 | of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF 16 | ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED 17 | TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 18 | PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT 19 | SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 20 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 21 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR 22 | IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 23 | DEALINGS IN THE SOFTWARE. 24 | -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "dhall" 3 | version = "0.1.17" 4 | authors = ["Simon Zeng ", "Tristan Cacqueray ", "Matthias Endler "] 5 | description = "Python bindings for dhall, a functional configuration language" 6 | edition = "2018" 7 | license = "Apache-2.0" 8 | repository = "https://github.com/s-zeng/dhall-python" 9 | homepage = "https://github.com/s-zeng/dhall-python" 10 | readme = "README.md" 11 | keywords = ["dhall", "python"] 12 | 13 | [dependencies] 14 | serde_json = "1" 15 | serde = "1" 16 | serde_derive = "1" 17 | serde_dhall = "0.12" 18 | pyo3 = "0.19" 19 | thiserror = "1" 20 | openssl = {version = "0.10", features = ["vendored"]} 21 | 22 | [lib] 23 | name = "dhall" 24 | crate-type = ["rlib", "cdylib"] 25 | 26 | [features] 27 | # We must make this feature optional to build binaries such as the profiling crate 28 | default = ["pyo3/extension-module"] 29 | 30 | # [workspace] 31 | # members = [ "profiling" ] 32 | 33 | # [profile.release] 34 | # codegen-units = 1 35 | # debug = false 36 | # incremental = false 37 | # lto = true 38 | # opt-level = 3 39 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: help 2 | help: ## This help message 3 | @echo -e "$$(grep -hE '^\S+:.*##' $(MAKEFILE_LIST) | sed -e 's/:.*##\s*/:/' -e 's/^\(.\+\):\(.*\)/\\x1b[36m\1\\x1b[m:\2/' | column -c2 -t -s :)" 4 | 5 | publish: ## Publish the binding 6 | twine upload target/wheels/dhall*.whl 7 | 8 | .PHONY: build 9 | build: dev-packages ## Builds Rust code and dhall-python Python modules 10 | poetry run maturin build --rustc-extra-args="-Wall" 11 | 12 | .PHONY: build-release 13 | build-release: dev-packages ## Build dhall-python module in release mode 14 | poetry run maturin build --release 15 | 16 | .PHONY: install 17 | install: dev-packages ## Install dhall-python module into current virtualenv 18 | poetry run maturin develop --release 19 | 20 | .PHONY: publish 21 | publish: ## Publish crate on Pypi 22 | poetry run maturin publish 23 | 24 | .PHONY: clean 25 | clean: ## Clean up build artifacts 26 | cargo clean 27 | 28 | .PHONY: dev-packages 29 | dev-packages: ## Install Python development packages for project 30 | poetry install 31 | 32 | .PHONY: test 33 | test: dev-packages install quicktest ## Intall dhall-python module and run tests 34 | 35 | .PHONY: quicktest 36 | quicktest: ## Run tests on already installed dhall-python module 37 | poetry run pytest tests 38 | -------------------------------------------------------------------------------- /pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "dhall" 3 | version = "0.1.17" 4 | description = "Python bindings for dhall, a functional configuration language" 5 | authors = ["Simon Zeng ", "Tristan Cacqueray ", "Matthias Endler "] 6 | license = "Apache-2.0" 7 | readme = "README.md" 8 | packages = [{ include = "dhall" }] 9 | repository = "https://github.com/s-zeng/dhall-python" 10 | keywords = ["dhall", "python"] 11 | classifiers = [ 12 | "Development Status :: 4 - Beta", 13 | "Intended Audience :: Developers", 14 | "License :: OSI Approved :: Apache Software License", 15 | "License :: OSI Approved", 16 | "Operating System :: MacOS", 17 | "Operating System :: Microsoft :: Windows", 18 | "Operating System :: POSIX :: Linux", 19 | "Programming Language :: Python :: 3", 20 | ] 21 | 22 | [tool.poetry.dependencies] 23 | python = "^3.7" 24 | 25 | [tool.poetry.dev-dependencies] 26 | pytest = "~=7.0" 27 | pylint = "~=2.6" 28 | flake8 = "~=5.0" 29 | wheel = "*" 30 | pytest-runner = "*" 31 | pytest-benchmark = "*" 32 | hypothesis = "*" 33 | autopep8 = "*" 34 | maturin = "~=1.1" 35 | 36 | [build-system] 37 | requires = ["maturin"] 38 | build-backend = "maturin" 39 | 40 | [tool.maturin] 41 | compatibility = "manylinux_2_24" 42 | skip-auditwheel = false 43 | sdist-include = ["dhall/*"] 44 | -------------------------------------------------------------------------------- /tests/test_known_bad_behaviour.py: -------------------------------------------------------------------------------- 1 | import string 2 | 3 | import pytest 4 | from hypothesis import given 5 | from hypothesis import strategies as st 6 | 7 | import dhall 8 | 9 | # min, max: RFC 7159 10 | st_negatives = st.integers(min_value=-(2**53) + 1, max_value=0) 11 | st_naturals = st.integers(min_value=0, max_value=(2**53) - 1) 12 | st_int = st.integers(min_value=-(2**53) + 1, max_value=(2**53) - 1) 13 | st_floats = st.floats(min_value=-(2**53) + 1, max_value=(2**53) - 1) 14 | 15 | keywords = ["as"] 16 | 17 | st_failing_json = st.recursive( 18 | st.booleans() | st.text() | st_int, # | st_floats 19 | lambda children: st.dictionaries( 20 | st.text(alphabet=string.digits, min_size=1) | st.sampled_from(keywords), 21 | children, 22 | min_size=1, 23 | ), 24 | ) 25 | 26 | # KNOWN FAILURES: these tests demonstrate current undesired behaviour of python-dhall 27 | # we should aim to make these tests fail :) 28 | 29 | 30 | @given(st.none()) 31 | def test_none(xs): 32 | assert dhall.loads(dhall.dumps(xs)) != xs 33 | assert dhall.loads(dhall.dumps(xs)) == {} 34 | 35 | 36 | # test lists of lists of integers w/ empty lists errors 37 | # e.g. [[3, 4], [6], []] 38 | @given(st.lists(st.lists(st_int), min_size=1).map(lambda lst: lst + [[]])) 39 | def test_empty_list_in_list_of_lists(xs): 40 | with pytest.raises(TypeError): 41 | assert dhall.loads(dhall.dumps(xs)) == xs 42 | 43 | 44 | @given( 45 | st.lists(st_naturals.filter(lambda x: x != 0), min_size=1).flatmap( 46 | lambda lstA: st.lists(st_negatives.filter(lambda x: x != 0), min_size=1).map( 47 | lambda lstB: lstA + lstB 48 | ) 49 | ) 50 | ) 51 | def test_list_mixed_sign_integers(lst): 52 | with pytest.raises(TypeError): 53 | assert dhall.loads(dhall.dumps(lst)) == lst 54 | 55 | 56 | # flaky test 57 | # @given(st_failing_json.filter(lambda x: isinstance(x, dict))) 58 | # def test_json_obj(j_obj): 59 | # with pytest.raises(TypeError): 60 | # assert dhall.loads(dhall.dumps(j_obj)) == j_obj 61 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | Byte-compiled / optimized / DLL files 2 | __pycache__/ 3 | *.py[cod] 4 | *$py.class 5 | 6 | # C extensions 7 | *.so 8 | 9 | # Distribution / packaging 10 | .Python 11 | build/ 12 | develop-eggs/ 13 | dist/ 14 | downloads/ 15 | eggs/ 16 | .eggs/ 17 | lib/ 18 | lib64/ 19 | parts/ 20 | sdist/ 21 | var/ 22 | wheels/ 23 | *.egg-info/ 24 | .installed.cfg 25 | *.egg 26 | MANIFEST 27 | 28 | # PyInstaller 29 | # Usually these files are written by a python script from a template 30 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 31 | *.manifest 32 | *.spec 33 | 34 | # Installer logs 35 | pip-log.txt 36 | pip-delete-this-directory.txt 37 | 38 | # Unit test / coverage reports 39 | htmlcov/ 40 | .tox/ 41 | .coverage 42 | .coverage.* 43 | .cache 44 | nosetests.xml 45 | coverage.xml 46 | *.cover 47 | .hypothesis/ 48 | .pytest_cache/ 49 | 50 | # Translations 51 | *.mo 52 | *.pot 53 | 54 | # Django stuff: 55 | *.log 56 | local_settings.py 57 | db.sqlite3 58 | 59 | # Flask stuff: 60 | instance/ 61 | .webassets-cache 62 | 63 | # Scrapy stuff: 64 | .scrapy 65 | 66 | # Sphinx documentation 67 | docs/_build/ 68 | 69 | # PyBuilder 70 | target/ 71 | 72 | # Jupyter Notebook 73 | .ipynb_checkpoints 74 | 75 | # pyenv 76 | .python-version 77 | 78 | # celery beat schedule file 79 | celerybeat-schedule 80 | 81 | # SageMath parsed files 82 | *.sage.py 83 | 84 | # Environments 85 | .env 86 | .venv 87 | env/ 88 | venv/ 89 | ENV/ 90 | env.bak/ 91 | venv.bak/ 92 | 93 | # Spyder project settings 94 | .spyderproject 95 | .spyproject 96 | 97 | # Rope project settings 98 | .ropeproject 99 | 100 | # mkdocs documentation 101 | /site 102 | 103 | # mypy 104 | .mypy_cache/ 105 | 106 | # Generated by Cargo 107 | # will have compiled files and executables 108 | /target/ 109 | 110 | # These are backup files generated by rustfmt 111 | **/*.rs.bk 112 | skipped.py 113 | benchmark.json 114 | .idea 115 | flame.svg 116 | perf.data 117 | perf.data.old 118 | poetry.lock 119 | Cargo.toml.orig 120 | .direnv/ 121 | -------------------------------------------------------------------------------- /tests/test_hypothesis.py: -------------------------------------------------------------------------------- 1 | import string 2 | 3 | import pytest 4 | from hypothesis import given 5 | from hypothesis import strategies as st 6 | 7 | import dhall 8 | 9 | # min, max: RFC 7159 10 | st_naturals = st.integers(min_value=0, max_value=(2**53) - 1) 11 | st_int = st.integers(min_value=-(2**53) + 1, max_value=(2**53) - 1) 12 | st_floats = st.floats(min_value=-(2**53) + 1, max_value=(2**53) - 1) 13 | 14 | st_text = st.text(alphabet=st.characters(blacklist_categories=["Cn", "Cs"])) 15 | 16 | # st.floats would be nice, but then we need pytest.approx, which doesn't work with eg. text 17 | st_json = st.recursive( 18 | st.booleans() | st_text | st.none() | st_int, # | st_floats 19 | lambda children: st.lists(children) | st.dictionaries(st_text, children), 20 | ) 21 | 22 | keywords = ["as"] 23 | 24 | st_passing_json = st.recursive( 25 | st.booleans() | st_text | st_int, # | st_floats 26 | lambda children: st.dictionaries( 27 | st.text(alphabet=string.ascii_letters).filter(lambda x: x not in keywords), 28 | children, 29 | ), 30 | ) 31 | 32 | 33 | @given(st_floats) 34 | def test_floats(xs): 35 | assert dhall.loads(dhall.dumps(xs)) == pytest.approx(xs) # fails when abs=0.05 36 | 37 | 38 | @given(st_text) 39 | def test_text(xs): 40 | assert dhall.loads(dhall.dumps(xs)) == xs 41 | 42 | 43 | @given(st.booleans()) 44 | def test_bool(xs): 45 | assert dhall.loads(dhall.dumps(xs)) == xs 46 | 47 | 48 | @given(st.lists(st_naturals, min_size=1)) 49 | def test_list_naturals(lst): 50 | assert dhall.loads(dhall.dumps(lst)) == lst 51 | 52 | 53 | @given( 54 | st.lists(st.floats(min_value=-(2**53) + 1, max_value=(2**53) - 1), min_size=1) 55 | ) 56 | def test_list_floats(lst): 57 | assert dhall.loads(dhall.dumps(lst)) == pytest.approx(lst) 58 | 59 | 60 | @given(st.lists(st_text, min_size=1)) 61 | def test_list_text(lst): 62 | assert dhall.loads(dhall.dumps(lst)) == lst 63 | 64 | 65 | # TODO: fix https://pipelines.actions.githubusercontent.com/bvEb9nCIBV2sqdaDi8oIyVnWMTk9yQhCrOseL3I17XXo50cO3u/_apis/pipelines/1/runs/6/signedlogcontent/12?urlExpires=2020-10-31T16%3A16%3A29.9424385Z&urlSigningMethod=HMACV1&urlSignature=HNlGC9qiZr5whn66mFkdJlMoavo7ycV6%2BH9icX7mmRA%3D 66 | # @given(st_passing_json) 67 | # def test_json_obj(j_obj): 68 | # assert dhall.loads(dhall.dumps(j_obj)) == j_obj 69 | -------------------------------------------------------------------------------- /.github/workflows/helpers.dhall: -------------------------------------------------------------------------------- 1 | let GithubActions = 2 | https://raw.githubusercontent.com/regadas/github-actions-dhall/04e304c2a73cb3dcdd77449f807ad259128e0d5c/package.dhall 3 | sha256:3af4c42342006a960fde1018fbcbe3333abd0fd3b108c0888f7cd5ff35937032 4 | 5 | let Prelude = 6 | https://prelude.dhall-lang.org/v21.1.0/package.dhall 7 | sha256:0fed19a88330e9a8a3fbe1e8442aa11d12e38da51eb12ba8bcb56f3c25d0854a 8 | 9 | let unlines = Prelude.Text.concatSep "\n" 10 | 11 | let ghVar = λ(varName : Text) → "\${{ ${varName} }}" 12 | 13 | let constants = 14 | { latestPython = "3.10" 15 | , matrixPython = ghVar "matrix.python-version" 16 | , manylinuxContainer = "quay.io/pypa/manylinux_2_24_x86_64" 17 | , supportedPythons = [ "3.7", "3.8", "3.9", "3.10", "3.11" ] 18 | , releaseCreatedCondition = 19 | "github.event_name == 'release' && github.event.action == 'created'" 20 | , releaseTagCondition = "startsWith(github.ref, 'refs/tags/')" 21 | } 22 | 23 | let enums = 24 | { DependencySet = < Full | Lint | Bump > 25 | , SupportedOs = < Windows | Mac | Linux > 26 | , ReleaseType = < Release | Dev > 27 | } 28 | 29 | let setup = 30 | { dhall = GithubActions.Step::{ 31 | , uses = Some "dhall-lang/setup-dhall@v4" 32 | , name = Some "Install dhall" 33 | , `with` = Some (toMap { version = "1.41.1" }) 34 | } 35 | , python = 36 | λ(version : Text) → 37 | GithubActions.Step::{ 38 | , uses = Some "actions/setup-python@v3" 39 | , name = Some "Setup python ${version}" 40 | , `with` = Some (toMap { python-version = version }) 41 | } 42 | , rust = GithubActions.Step::{ 43 | , uses = Some "actions-rs/toolchain@v1" 44 | , name = Some "Install Rust" 45 | , `with` = Some (toMap { toolchain = "stable", override = "true" }) 46 | } 47 | } 48 | 49 | let installDeps = 50 | λ(installType : enums.DependencySet) → 51 | λ(pythonExec : Text) → 52 | let fullDeps = 53 | [ "${pythonExec} -m pip install poetry" 54 | , "touch Cargo.toml.orig" 55 | , "${pythonExec} -m poetry install" 56 | ] 57 | 58 | let deps = 59 | merge 60 | { Full = fullDeps 61 | , Lint = 62 | [ "${pythonExec} -m pip install black isort autoflake" ] 63 | , Bump = [ "cargo install cargo-bump" ] # fullDeps 64 | } 65 | installType 66 | 67 | in GithubActions.Step::{ 68 | , name = Some "Install dependencies" 69 | , run = Some 70 | ( unlines 71 | ([ "${pythonExec} -m pip install --upgrade pip" ] # deps) 72 | ) 73 | } 74 | 75 | in { unlines 76 | , ghVar 77 | , constants 78 | , enums 79 | , setup 80 | , GithubActions 81 | , Prelude 82 | , installDeps 83 | } 84 | -------------------------------------------------------------------------------- /.github/workflows/ci.dhall: -------------------------------------------------------------------------------- 1 | let helpers = ./helpers.dhall 2 | 3 | let builder = ./builder.dhall 4 | 5 | let GithubActions = helpers.GithubActions 6 | 7 | let enums = helpers.enums 8 | 9 | let constants = helpers.constants 10 | 11 | let setup = helpers.setup 12 | 13 | in GithubActions.Workflow::{ 14 | , name = "CI" 15 | , on = GithubActions.On::{ 16 | , push = Some GithubActions.Push::{ branches = Some [ "master" ] } 17 | , pull_request = Some GithubActions.PullRequest::{ 18 | , branches = Some [ "master" ] 19 | } 20 | , release = Some GithubActions.Release::{ 21 | , types = Some [ GithubActions.types.Release/types.created ] 22 | } 23 | , schedule = Some [ { cron = "20 23 * * 6" } ] 24 | } 25 | , jobs = toMap 26 | { lint = GithubActions.Job::{ 27 | , name = Some "Lint check" 28 | , runs-on = GithubActions.RunsOn.Type.ubuntu-latest 29 | , steps = 30 | [ GithubActions.steps.actions/checkout 31 | , setup.dhall 32 | , GithubActions.Step::{ 33 | , name = Some "Check github actions workflow" 34 | , `if` = Some "github.event.name != 'pull_request'" 35 | , run = Some 36 | ( helpers.unlines 37 | [ "dhall lint .github/workflows/*.dhall" 38 | , "yaml-to-dhall ./.github/workflows/schema.dhall < .github/workflows/ci.yml > expected.dhall" 39 | , "dhall diff ./expected.dhall ./.github/workflows/ci.dhall" 40 | ] 41 | ) 42 | } 43 | , setup.python constants.latestPython 44 | , helpers.installDeps enums.DependencySet.Lint "python" 45 | , GithubActions.Step::{ 46 | , name = Some "Check lint" 47 | , run = Some 48 | ( helpers.unlines 49 | [ "isort . --check --diff", "black . --check" ] 50 | ) 51 | } 52 | ] 53 | } 54 | , macBuild = builder enums.SupportedOs.Mac 55 | , windowsBuild = builder enums.SupportedOs.Windows 56 | , linuxBuild = builder enums.SupportedOs.Linux 57 | , bump = GithubActions.Job::{ 58 | , name = Some "Bump minor version" 59 | , needs = Some [ "lint" ] 60 | , `if` = Some constants.releaseCreatedCondition 61 | , runs-on = GithubActions.RunsOn.Type.ubuntu-latest 62 | , steps = 63 | [ GithubActions.steps.actions/checkout 64 | ⫽ { `with` = Some (toMap { ref = "master" }) } 65 | , setup.python constants.latestPython 66 | , setup.rust 67 | , helpers.installDeps enums.DependencySet.Bump "python" 68 | , GithubActions.Step::{ 69 | , name = Some "Bump and push" 70 | , run = Some 71 | ( helpers.unlines 72 | [ "cargo bump patch" 73 | , "poetry version patch" 74 | , "git config user.name github-actions" 75 | , "git config user.email github-actions@github.com" 76 | , "git add Cargo.toml pyproject.toml" 77 | , "git commit -m \"Bump version (automatic commit)\"" 78 | , "git push" 79 | ] 80 | ) 81 | } 82 | ] 83 | } 84 | } 85 | } 86 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | [![Dhall logo](https://github.com/dhall-lang/dhall-lang/blob/master/img/dhall-logo.svg)](https://dhall-lang.org/) 2 | 3 | [![Maintenance](https://img.shields.io/badge/Maintained%3F-yes-green.svg)](https://GitHub.com/s-zeng/dhall-python/graphs/commit-activity) 4 | [![CI status](https://github.com/s-zeng/dhall-python/workflows/CI/badge.svg)](https://github.com/s-zeng/dhall-python/actions) 5 | [![PyPI version shields.io](https://img.shields.io/pypi/v/dhall.svg)](https://pypi.python.org/pypi/dhall/) 6 | [![PyPI downloads](https://img.shields.io/pypi/dm/dhall.svg)](https://pypistats.org/packages/dhall) 7 | 8 | Dhall is a programmable configuration language optimized for 9 | maintainability. 10 | 11 | You can think of Dhall as: JSON + functions + types + imports 12 | 13 | Note that while Dhall is programmable, Dhall is not Turing-complete. Many 14 | of Dhall's features take advantage of this restriction to provide stronger 15 | safety guarantees and more powerful tooling. 16 | 17 | You can try the language live in your browser by visiting the official website: 18 | 19 | * [https://dhall-lang.org](http://dhall-lang.org/) 20 | 21 | # `dhall-python` 22 | 23 | `dhall-python` contains [Dhall][dhall-lang] bindings for Python using the 24 | [rust][dhall-rust] implementation. It is meant to be used to integrate Dhall 25 | into your python applications. 26 | 27 | If you only want to convert Dhall to/from JSON or YAML, you should use the 28 | official tooling instead; instructions can be found 29 | [here](https://docs.dhall-lang.org/tutorials/Getting-started_Generate-JSON-or-YAML.html). 30 | 31 | ## Usage 32 | 33 | Install using pip: 34 | 35 | ```shell 36 | pip install dhall 37 | ``` 38 | 39 | Supports the following: 40 | 41 | - Operating Systems 42 | - Windows 43 | - Mac OS 44 | - Linux (manylinux_2_24_x86_64) 45 | - Python versions 46 | - 3.7 47 | - 3.8 48 | - 3.9 49 | - 3.10 50 | - 3.11 51 | 52 | Python 3.5 and 3.6 support is available in older versions of dhall-python. 53 | 54 | dhall-python implements a similar API to Python's [json 55 | module](https://docs.python.org/3/library/json.html): 56 | 57 | ```python 58 | >>> import dhall 59 | >>> dhall.dumps({"keyA": 81, "keyB": True, "keyC": "value"}) 60 | '{ keyA = 81, keyB = True, keyC = "value" }' 61 | >>> dhall.loads("""{ keyA = 81, keyB = True, keyC = "value" }""") 62 | {'keyA': 81, 'keyB': True, 'keyC': 'value'} 63 | ``` 64 | 65 | # License 66 | 67 | dhall-python is licensed under either of 68 | 69 | - Apache License, Version 2.0, (LICENSE-APACHE or 70 | http://www.apache.org/licenses/LICENSE-2.0) 71 | - MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT) 72 | 73 | at your option. 74 | 75 | # Contribution 76 | 77 | Unless you explicitly state otherwise, any contribution intentionally submitted 78 | for inclusion in python-dhall by you, as defined in the Apache-2.0 license, shall 79 | be dual licensed as above, without any additional terms or conditions. 80 | 81 | All contributions are welcome! If you spot any bugs, or have any requests, 82 | issues and PRs are always welcome. 83 | 84 | # Developer guide 85 | 86 | This project uses [poetry](https://python-poetry.org/docs/) for managing the development environment. If you don't have it installed, run 87 | 88 | ``` 89 | curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python 90 | export PATH="$HOME/.poetry/bin:$PATH" 91 | ``` 92 | 93 | The project requires the latest `stable` version of Rust. 94 | 95 | Install it via `rustup`: 96 | 97 | ``` 98 | rustup install stable 99 | ``` 100 | 101 | If you have already installed the `stable` version, make sure it is up-to-date: 102 | 103 | ``` 104 | rustup update stable 105 | ``` 106 | 107 | After that, you can compile the current version of dhall-python and execute all tests and benchmarks with the following commands: 108 | 109 | ``` 110 | make install 111 | make test 112 | ``` 113 | 114 | 🤫 Pssst!... run `make help` to learn more. 115 | 116 | 117 | [dhall-rust]: https://github.com/Nadrieril/dhall-rust 118 | [dhall-lang]: https://dhall-lang.org 119 | -------------------------------------------------------------------------------- /.github/workflows/builder.dhall: -------------------------------------------------------------------------------- 1 | let helpers = ./helpers.dhall 2 | 3 | let GithubActions = helpers.GithubActions 4 | 5 | let enums = helpers.enums 6 | 7 | let constants = helpers.constants 8 | 9 | let setup = helpers.setup 10 | 11 | let OsConfig = 12 | { Type = 13 | { pythonExec : Text 14 | , container : Optional Text 15 | , runs-on : GithubActions.RunsOn.Type 16 | , pythonSetup : List GithubActions.Step.Type 17 | , interpreterArg : Text 18 | , strategy : Optional GithubActions.Strategy.Type 19 | , osName : Text 20 | , wheelsToInstall : Text 21 | } 22 | , default = 23 | { pythonExec = "python" 24 | , container = None Text 25 | , pythonSetup = [] : List GithubActions.Step.Type 26 | , interpreterArg = " --interpreter python${constants.matrixPython}" 27 | , strategy = Some GithubActions.Strategy::{ 28 | , fail-fast = Some True 29 | , matrix = toMap { python-version = constants.supportedPythons } 30 | } 31 | } 32 | } 33 | 34 | let osSpecificConfig = 35 | { Linux = OsConfig::{ 36 | , pythonExec = "python${constants.matrixPython}" 37 | , container = Some constants.manylinuxContainer 38 | , runs-on = GithubActions.RunsOn.Type.ubuntu-latest 39 | , osName = "Linux" 40 | , wheelsToInstall = "target/wheels/dhall*manylinux*.whl" 41 | } 42 | , Mac = OsConfig::{ 43 | , runs-on = GithubActions.RunsOn.Type.macos-latest 44 | , pythonSetup = [ setup.python constants.matrixPython ] 45 | , osName = "Mac" 46 | , wheelsToInstall = "target/wheels/dhall*.whl" 47 | } 48 | , Windows = OsConfig::{ 49 | , runs-on = GithubActions.RunsOn.Type.windows-latest 50 | , interpreterArg = "" 51 | , strategy = None GithubActions.Strategy.Type 52 | , osName = "Windows" 53 | , wheelsToInstall = "--find-links=target\\wheels dhall" 54 | } 55 | } 56 | 57 | let mainBuilder = 58 | λ(os : enums.SupportedOs) → 59 | λ(release : enums.ReleaseType) → 60 | let config = merge osSpecificConfig os 61 | 62 | let releaseStr = λ(x : Text) → merge { Release = x, Dev = "" } release 63 | 64 | let releaseCond = 65 | merge 66 | { Release = constants.releaseCreatedCondition 67 | , Dev = "!(${constants.releaseCreatedCondition})" 68 | } 69 | release 70 | 71 | in GithubActions.Step::{ 72 | , name = Some 73 | "Build and test python package${releaseStr " (Release)"}" 74 | , `if` = Some releaseCond 75 | , run = Some 76 | ( helpers.unlines 77 | [ "${config.pythonExec} -m poetry run maturin build ${releaseStr 78 | "--release"} --strip${config.interpreterArg}" 79 | , "${config.pythonExec} -m poetry run maturin develop" 80 | , "${config.pythonExec} -m poetry run pytest tests" 81 | ] 82 | ) 83 | } 84 | 85 | in λ(os : enums.SupportedOs) → 86 | let config = merge osSpecificConfig os 87 | 88 | in GithubActions.Job::{ 89 | , name = Some "Build/test/publish ${config.osName}" 90 | , runs-on = config.runs-on 91 | , container = config.container 92 | , needs = Some [ "lint" ] 93 | , strategy = config.strategy 94 | , steps = 95 | config.pythonSetup 96 | # [ setup.rust 97 | , GithubActions.steps.actions/checkout 98 | , helpers.installDeps enums.DependencySet.Full config.pythonExec 99 | , mainBuilder os enums.ReleaseType.Dev 100 | , mainBuilder os enums.ReleaseType.Release 101 | , GithubActions.Step::{ 102 | , name = Some "Install wheels" 103 | , run = Some 104 | "${config.pythonExec} -m pip install ${config.wheelsToInstall}" 105 | } 106 | , GithubActions.Step::{ 107 | , name = Some "Release" 108 | , uses = Some "softprops/action-gh-release@v1" 109 | , `if` = Some 110 | "${constants.releaseTagCondition} && ${constants.releaseCreatedCondition}" 111 | , `with` = Some (toMap { files = "target/wheels/dhall*.whl" }) 112 | , env = Some 113 | ( toMap 114 | { GITHUB_TOKEN = helpers.ghVar "secrets.GITHUB_TOKEN" 115 | } 116 | ) 117 | } 118 | , GithubActions.Step::{ 119 | , name = Some "PyPI publish" 120 | , `if` = Some 121 | "${constants.releaseTagCondition} && ${constants.releaseCreatedCondition}" 122 | , env = Some 123 | ( toMap 124 | { MATURIN_PASSWORD = helpers.ghVar "secrets.PYPI" } 125 | ) 126 | , run = Some 127 | "${config.pythonExec} -m poetry run maturin publish --no-sdist --username __token__${config.interpreterArg}" 128 | } 129 | ] 130 | } 131 | -------------------------------------------------------------------------------- /.github/workflows/ci.yml: -------------------------------------------------------------------------------- 1 | jobs: 2 | bump: 3 | if: "github.event_name == 'release' && github.event.action == 'created'" 4 | name: Bump minor version 5 | needs: 6 | - lint 7 | runs-on: ubuntu-latest 8 | steps: 9 | - uses: "actions/checkout@v2" 10 | with: 11 | ref: master 12 | - name: Setup python 3.10 13 | uses: "actions/setup-python@v3" 14 | with: 15 | python-version: '3.10' 16 | - name: Install Rust 17 | uses: "actions-rs/toolchain@v1" 18 | with: 19 | override: 'true' 20 | toolchain: stable 21 | - name: Install dependencies 22 | run: "python -m pip install --upgrade pip\ncargo install cargo-bump\npython -m pip install poetry\ntouch Cargo.toml.orig\npython -m poetry install" 23 | - name: Bump and push 24 | run: "cargo bump patch\npoetry version patch\ngit config user.name github-actions\ngit config user.email github-actions@github.com\ngit add Cargo.toml pyproject.toml\ngit commit -m \"Bump version (automatic commit)\"\ngit push" 25 | lint: 26 | name: Lint check 27 | runs-on: ubuntu-latest 28 | steps: 29 | - uses: "actions/checkout@v2" 30 | - name: Install dhall 31 | uses: "dhall-lang/setup-dhall@v4" 32 | with: 33 | version: '1.41.1' 34 | - if: "github.event.name != 'pull_request'" 35 | name: Check github actions workflow 36 | run: "dhall lint .github/workflows/*.dhall\nyaml-to-dhall ./.github/workflows/schema.dhall < .github/workflows/ci.yml > expected.dhall\ndhall diff ./expected.dhall ./.github/workflows/ci.dhall" 37 | - name: Setup python 3.10 38 | uses: "actions/setup-python@v3" 39 | with: 40 | python-version: '3.10' 41 | - name: Install dependencies 42 | run: "python -m pip install --upgrade pip\npython -m pip install black isort autoflake" 43 | - name: Check lint 44 | run: "isort . --check --diff\nblack . --check" 45 | linuxBuild: 46 | container: quay.io/pypa/manylinux_2_24_x86_64 47 | name: Build/test/publish Linux 48 | needs: 49 | - lint 50 | runs-on: ubuntu-latest 51 | steps: 52 | - name: Install Rust 53 | uses: "actions-rs/toolchain@v1" 54 | with: 55 | override: 'true' 56 | toolchain: stable 57 | - uses: "actions/checkout@v2" 58 | - name: Install dependencies 59 | run: "python${{ matrix.python-version }} -m pip install --upgrade pip\npython${{ matrix.python-version }} -m pip install poetry\ntouch Cargo.toml.orig\npython${{ matrix.python-version }} -m poetry install" 60 | - if: "!(github.event_name == 'release' && github.event.action == 'created')" 61 | name: Build and test python package 62 | run: "python${{ matrix.python-version }} -m poetry run maturin build --strip --interpreter python${{ matrix.python-version }}\npython${{ matrix.python-version }} -m poetry run maturin develop\npython${{ matrix.python-version }} -m poetry run pytest tests" 63 | - if: "github.event_name == 'release' && github.event.action == 'created'" 64 | name: "Build and test python package (Release)" 65 | run: "python${{ matrix.python-version }} -m poetry run maturin build --release --strip --interpreter python${{ matrix.python-version }}\npython${{ matrix.python-version }} -m poetry run maturin develop\npython${{ matrix.python-version }} -m poetry run pytest tests" 66 | - name: Install wheels 67 | run: "python${{ matrix.python-version }} -m pip install target/wheels/dhall*manylinux*.whl" 68 | - env: 69 | GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" 70 | if: "startsWith(github.ref, 'refs/tags/') && github.event_name == 'release' && github.event.action == 'created'" 71 | name: Release 72 | uses: "softprops/action-gh-release@v1" 73 | with: 74 | files: "target/wheels/dhall*.whl" 75 | - env: 76 | MATURIN_PASSWORD: "${{ secrets.PYPI }}" 77 | if: "startsWith(github.ref, 'refs/tags/') && github.event_name == 'release' && github.event.action == 'created'" 78 | name: PyPI publish 79 | run: "python${{ matrix.python-version }} -m poetry run maturin publish --no-sdist --username __token__ --interpreter python${{ matrix.python-version }}" 80 | strategy: 81 | fail-fast: true 82 | matrix: 83 | python-version: 84 | - '3.7' 85 | - '3.8' 86 | - '3.9' 87 | - '3.10' 88 | - '3.11' 89 | macBuild: 90 | name: Build/test/publish Mac 91 | needs: 92 | - lint 93 | runs-on: macos-latest 94 | steps: 95 | - name: "Setup python ${{ matrix.python-version }}" 96 | uses: "actions/setup-python@v3" 97 | with: 98 | python-version: "${{ matrix.python-version }}" 99 | - name: Install Rust 100 | uses: "actions-rs/toolchain@v1" 101 | with: 102 | override: 'true' 103 | toolchain: stable 104 | - uses: "actions/checkout@v2" 105 | - name: Install dependencies 106 | run: "python -m pip install --upgrade pip\npython -m pip install poetry\ntouch Cargo.toml.orig\npython -m poetry install" 107 | - if: "!(github.event_name == 'release' && github.event.action == 'created')" 108 | name: Build and test python package 109 | run: "python -m poetry run maturin build --strip --interpreter python${{ matrix.python-version }}\npython -m poetry run maturin develop\npython -m poetry run pytest tests" 110 | - if: "github.event_name == 'release' && github.event.action == 'created'" 111 | name: "Build and test python package (Release)" 112 | run: "python -m poetry run maturin build --release --strip --interpreter python${{ matrix.python-version }}\npython -m poetry run maturin develop\npython -m poetry run pytest tests" 113 | - name: Install wheels 114 | run: "python -m pip install target/wheels/dhall*.whl" 115 | - env: 116 | GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" 117 | if: "startsWith(github.ref, 'refs/tags/') && github.event_name == 'release' && github.event.action == 'created'" 118 | name: Release 119 | uses: "softprops/action-gh-release@v1" 120 | with: 121 | files: "target/wheels/dhall*.whl" 122 | - env: 123 | MATURIN_PASSWORD: "${{ secrets.PYPI }}" 124 | if: "startsWith(github.ref, 'refs/tags/') && github.event_name == 'release' && github.event.action == 'created'" 125 | name: PyPI publish 126 | run: "python -m poetry run maturin publish --no-sdist --username __token__ --interpreter python${{ matrix.python-version }}" 127 | strategy: 128 | fail-fast: true 129 | matrix: 130 | python-version: 131 | - '3.7' 132 | - '3.8' 133 | - '3.9' 134 | - '3.10' 135 | - '3.11' 136 | windowsBuild: 137 | name: Build/test/publish Windows 138 | needs: 139 | - lint 140 | runs-on: windows-latest 141 | steps: 142 | - name: Install Rust 143 | uses: "actions-rs/toolchain@v1" 144 | with: 145 | override: 'true' 146 | toolchain: stable 147 | - uses: "actions/checkout@v2" 148 | - name: Install dependencies 149 | run: "python -m pip install --upgrade pip\npython -m pip install poetry\ntouch Cargo.toml.orig\npython -m poetry install" 150 | - if: "!(github.event_name == 'release' && github.event.action == 'created')" 151 | name: Build and test python package 152 | run: "python -m poetry run maturin build --strip\npython -m poetry run maturin develop\npython -m poetry run pytest tests" 153 | - if: "github.event_name == 'release' && github.event.action == 'created'" 154 | name: "Build and test python package (Release)" 155 | run: "python -m poetry run maturin build --release --strip\npython -m poetry run maturin develop\npython -m poetry run pytest tests" 156 | - name: Install wheels 157 | run: "python -m pip install --find-links=target\\wheels dhall" 158 | - env: 159 | GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" 160 | if: "startsWith(github.ref, 'refs/tags/') && github.event_name == 'release' && github.event.action == 'created'" 161 | name: Release 162 | uses: "softprops/action-gh-release@v1" 163 | with: 164 | files: "target/wheels/dhall*.whl" 165 | - env: 166 | MATURIN_PASSWORD: "${{ secrets.PYPI }}" 167 | if: "startsWith(github.ref, 'refs/tags/') && github.event_name == 'release' && github.event.action == 'created'" 168 | name: PyPI publish 169 | run: python -m poetry run maturin publish --no-sdist --username __token__ 170 | name: CI 171 | on: 172 | pull_request: 173 | branches: 174 | - master 175 | push: 176 | branches: 177 | - master 178 | release: 179 | types: 180 | - created 181 | schedule: 182 | - cron: "20 23 * * 6" 183 | -------------------------------------------------------------------------------- /LICENSE-APACHE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright [yyyy] [name of copyright owner] 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /src/lib.rs: -------------------------------------------------------------------------------- 1 | use std::collections::BTreeMap; 2 | use std::fmt; 3 | use std::marker::PhantomData; 4 | 5 | use pyo3::exceptions::PyTypeError; 6 | use pyo3::prelude::*; 7 | use pyo3::types::{PyAny, PyDict, PyFloat, PyList, PyTuple}; 8 | use pyo3::{import_exception, wrap_pyfunction}; 9 | use serde_dhall::{NumKind, SimpleValue}; 10 | use thiserror::Error; 11 | 12 | use serde::de::{self, DeserializeSeed, Deserializer, MapAccess, SeqAccess, Visitor}; 13 | use serde::ser::{self, Serialize, SerializeMap, SerializeSeq, Serializer}; 14 | 15 | #[derive(Debug, Error)] 16 | pub enum DhallPythonError { 17 | #[error("Conversion error: {error}")] 18 | InvalidConversion { error: serde_dhall::Error }, 19 | #[error("Python Runtime exception: {error}")] 20 | PyErr { error: String }, 21 | #[error("Dictionary key is not a string: {obj:?}")] 22 | DictKeyNotString { obj: PyObject }, 23 | #[error("Invalid float: {x}")] 24 | InvalidFloat { x: String }, 25 | #[error("Invalid type: {t}, Error: {e}")] 26 | InvalidCast { t: String, e: String }, 27 | // NoneError doesn't have an impl for `Display` 28 | // See https://github.com/rust-lang-nursery/failure/issues/61 29 | // See https://github.com/rust-lang/rust/issues/42327#issuecomment-378324282 30 | // #[fail(display = "Error: {}", s)] 31 | // NoneError { s: String }, 32 | } 33 | 34 | impl From for DhallPythonError { 35 | fn from(error: serde_dhall::Error) -> DhallPythonError { 36 | DhallPythonError::InvalidConversion { error } 37 | } 38 | } 39 | 40 | impl From for PyErr { 41 | fn from(h: DhallPythonError) -> PyErr { 42 | match h { 43 | DhallPythonError::InvalidConversion { error } => { 44 | PyErr::new::(format!("{}", error)) 45 | } 46 | // TODO 47 | DhallPythonError::PyErr { error: _error } => PyErr::new::("PyErr"), 48 | DhallPythonError::InvalidCast { t: _t, e: _e } => { 49 | PyErr::new::("InvalidCast") 50 | } 51 | _ => PyErr::new::("Unknown reason"), 52 | } 53 | } 54 | } 55 | 56 | impl From for DhallPythonError { 57 | fn from(error: PyErr) -> DhallPythonError { 58 | // TODO: This should probably just have the underlying PyErr as an argument, 59 | // but this type is not `Sync`, so we just use the debug representation for now. 60 | DhallPythonError::PyErr { 61 | error: format!("{:?}", error), 62 | } 63 | } 64 | } 65 | 66 | import_exception!(json, JSONDecodeError); 67 | 68 | #[pyfunction] 69 | pub fn load(py: Python, fp: PyObject, kwargs: Option<&PyDict>) -> PyResult { 70 | // Temporary workaround for 71 | // https://github.com/PyO3/pyo3/issues/145 72 | let io: &PyAny = fp.extract(py)?; 73 | 74 | // Alternative workaround 75 | // fp.getattr(py, "seek")?; 76 | // fp.getattr(py, "read")?; 77 | 78 | // Reset file pointer to beginning See 79 | // https://github.com/PyO3/pyo3/issues/143 Note that we ignore the return 80 | // value, because `seek` does not strictly need to exist on the object 81 | let _success = io.call_method("seek", (0,), None); 82 | 83 | let s_obj = io.call_method0("read")?; 84 | loads(py, s_obj.to_object(py), kwargs) 85 | } 86 | 87 | // This function is a poor man's implementation of 88 | // impl From<&str> for PyResult, which is not possible, 89 | // because we have none of these types under our control. 90 | // Note: Encoding param is deprecated and ignored. 91 | #[pyfunction] 92 | pub fn loads(py: Python, s: PyObject, kwargs: Option<&PyDict>) -> PyResult { 93 | // This was moved out of the Python module code to enable benchmarking. 94 | loads_impl(py, s, kwargs) 95 | } 96 | 97 | #[pyfunction] 98 | // ensure_ascii, check_circular, allow_nan, cls, indent, separators, default, sort_keys, kwargs = "**")] 99 | #[allow(unused_variables)] 100 | pub fn dumps( 101 | py: Python, 102 | obj: PyObject, 103 | sort_keys: Option, 104 | _kwargs: Option<&PyDict>, 105 | ) -> PyResult { 106 | let v = SerializePyObject { 107 | py, 108 | obj: obj.extract(py)?, 109 | sort_keys: match sort_keys { 110 | Some(sort_keys) => sort_keys.is_true(py)?, 111 | None => false, 112 | }, 113 | }; 114 | let s: Result = serde_dhall::serialize(&v) 115 | .to_string() 116 | .map_err(|error| DhallPythonError::InvalidConversion { error }); 117 | Ok(s?.to_object(py)) 118 | } 119 | 120 | #[pyfunction] 121 | pub fn dump( 122 | py: Python, 123 | obj: PyObject, 124 | fp: PyObject, 125 | _kwargs: Option<&PyDict>, 126 | ) -> PyResult { 127 | let s = dumps(py, obj, None, None)?; 128 | let fp_ref: &PyAny = fp.extract(py)?; 129 | fp_ref.call_method1("write", (s,))?; 130 | // TODO: Will this always return None? 131 | Ok(pyo3::Python::None(py)) 132 | } 133 | 134 | /// A hyper-fast JSON encoder/decoder written in Rust 135 | #[pymodule] 136 | fn dhall(_py: Python, m: &PyModule) -> PyResult<()> { 137 | // See https://github.com/PyO3/pyo3/issues/171 138 | // Use JSONDecodeError from stdlib until issue is resolved. 139 | // py_exception!(_hyperjson, JSONDecodeError); 140 | // m.add("JSONDecodeError", py.get_type::()); 141 | 142 | m.add("__version__", env!("CARGO_PKG_VERSION"))?; 143 | 144 | m.add_wrapped(wrap_pyfunction!(load))?; 145 | m.add_wrapped(wrap_pyfunction!(loads))?; 146 | m.add_wrapped(wrap_pyfunction!(dump))?; 147 | m.add_wrapped(wrap_pyfunction!(dumps))?; 148 | 149 | Ok(()) 150 | } 151 | 152 | /// Convert from a `serde_json::Value` to a `pyo3::object:PyObject`. 153 | pub fn from_json(py: Python, json: &SimpleValue) -> Result { 154 | macro_rules! obj { 155 | ($x:ident) => { 156 | Ok($x.to_object(py)) 157 | }; 158 | } 159 | 160 | match json { 161 | SimpleValue::Num(x) => match x { 162 | NumKind::Bool(n) => obj!(n), 163 | NumKind::Natural(n) => obj!(n), 164 | NumKind::Integer(n) => obj!(n), 165 | NumKind::Double(n) => { 166 | let d = f64::from(n.clone()); 167 | obj!(d) 168 | } 169 | }, 170 | SimpleValue::Text(x) => obj!(x), 171 | SimpleValue::Optional(o) => match o { 172 | None => Ok(py.None()), 173 | Some(b) => { 174 | let n = b.as_ref(); 175 | from_json(py, n) 176 | } 177 | }, 178 | SimpleValue::List(vec) => { 179 | let solution = vec 180 | .iter() 181 | .map(|i| from_json(py, i).unwrap()) 182 | .collect::>(); 183 | obj!(solution) 184 | } 185 | SimpleValue::Record(map) => { 186 | // TODO: put an omit_nones option here 187 | let solution: std::collections::HashMap<_, _> = map 188 | .iter() 189 | .map(|(key, value)| (key.clone(), from_json(py, value).unwrap())) 190 | .collect(); 191 | obj!(solution) 192 | } 193 | SimpleValue::Union(name, val) => match val { 194 | None => obj!(name), 195 | Some(b) => { 196 | let n = b.as_ref(); 197 | from_json(py, n) 198 | } 199 | }, 200 | } 201 | } 202 | 203 | pub fn loads_impl(py: Python, s: PyObject, _kwargs: Option<&PyDict>) -> PyResult { 204 | let string_result: Result = s.extract(py); 205 | match string_result { 206 | Ok(string) => { 207 | let json_val: std::result::Result = 208 | serde_dhall::from_str(&string).parse(); 209 | match json_val { 210 | Ok(val) => { 211 | let py_obj = from_json(py, &val).expect("from_json"); 212 | return Ok(py_obj); 213 | } 214 | Err(e) => { 215 | return Err(PyTypeError::new_err(format!("{:?}", e))); 216 | } 217 | } 218 | } 219 | Err(e) => { 220 | return Err(PyTypeError::new_err(format!( 221 | "the Dhall object must be str: {:?}", 222 | e 223 | ))); 224 | } 225 | } 226 | } 227 | 228 | struct SerializePyObject<'p, 'a> { 229 | py: Python<'p>, 230 | obj: &'a PyAny, 231 | sort_keys: bool, 232 | } 233 | 234 | impl<'p, 'a> Serialize for SerializePyObject<'p, 'a> { 235 | fn serialize(&self, serializer: S) -> Result 236 | where 237 | S: Serializer, 238 | { 239 | macro_rules! cast { 240 | ($f:expr) => { 241 | if let Ok(val) = PyTryFrom::try_from(self.obj) { 242 | return $f(val); 243 | } 244 | }; 245 | } 246 | 247 | macro_rules! extract { 248 | ($t:ty) => { 249 | if let Ok(val) = <$t as FromPyObject>::extract(self.obj) { 250 | return val.serialize(serializer); 251 | } 252 | }; 253 | } 254 | 255 | fn debug_py_err(err: PyErr) -> E { 256 | E::custom(format_args!("{:?}", err)) 257 | } 258 | 259 | cast!(|x: &PyDict| { 260 | let mut map = serializer.serialize_map(Some(x.len()))?; 261 | for (key, value) in x { 262 | if key.is_none() { 263 | map.serialize_key("null")?; 264 | } else if let Ok(key) = key.extract::() { 265 | map.serialize_key(if key { "true" } else { "false" })?; 266 | } else if let Ok(key) = key.str() { 267 | let key = key.to_str().map_err(debug_py_err)?; 268 | map.serialize_key(&key)?; 269 | } else { 270 | return Err(ser::Error::custom(format_args!( 271 | "Dictionary key is not a string: {:?}", 272 | key 273 | ))); 274 | } 275 | map.serialize_value(&SerializePyObject { 276 | py: self.py, 277 | obj: value, 278 | sort_keys: self.sort_keys, 279 | })?; 280 | } 281 | map.end() 282 | }); 283 | 284 | cast!(|x: &PyList| { 285 | let mut seq = serializer.serialize_seq(Some(x.len()))?; 286 | for element in x { 287 | seq.serialize_element(&SerializePyObject { 288 | py: self.py, 289 | obj: element, 290 | sort_keys: self.sort_keys, 291 | })? 292 | } 293 | seq.end() 294 | }); 295 | cast!(|x: &PyTuple| { 296 | let mut seq = serializer.serialize_seq(Some(x.len()))?; 297 | for element in x { 298 | seq.serialize_element(&SerializePyObject { 299 | py: self.py, 300 | obj: element, 301 | sort_keys: self.sort_keys, 302 | })? 303 | } 304 | seq.end() 305 | }); 306 | 307 | extract!(String); 308 | extract!(bool); 309 | 310 | cast!(|x: &PyFloat| x.value().serialize(serializer)); 311 | extract!(u64); 312 | extract!(i64); 313 | 314 | if self.obj.is_none() { 315 | return serializer.serialize_unit(); 316 | } 317 | 318 | match self.obj.repr() { 319 | Ok(repr) => Err(ser::Error::custom(format_args!( 320 | "Value is not JSON serializable: {}", 321 | repr, 322 | ))), 323 | Err(_) => Err(ser::Error::custom(format_args!( 324 | "Type is not JSON serializable: {:?}", 325 | self.obj.get_type().name(), 326 | ))), 327 | } 328 | } 329 | } 330 | 331 | #[derive(Copy, Clone)] 332 | struct HyperJsonValue<'a> { 333 | py: Python<'a>, 334 | parse_float: &'a Option, 335 | parse_int: &'a Option, 336 | } 337 | 338 | impl<'de, 'a> DeserializeSeed<'de> for HyperJsonValue<'a> { 339 | type Value = PyObject; 340 | 341 | fn deserialize(self, deserializer: D) -> Result 342 | where 343 | D: Deserializer<'de>, 344 | { 345 | deserializer.deserialize_any(self) 346 | } 347 | } 348 | 349 | impl<'a> HyperJsonValue<'a> { 350 | fn parse_primitive(self, value: T, parser: &PyObject) -> Result 351 | where 352 | E: de::Error, 353 | T: ToString, 354 | { 355 | match parser.call1(self.py, (value.to_string(),)) { 356 | Ok(primitive) => Ok(primitive), 357 | Err(err) => Err(de::Error::custom(DhallPythonError::from(err))), 358 | } 359 | } 360 | } 361 | 362 | impl<'de, 'a> Visitor<'de> for HyperJsonValue<'a> { 363 | type Value = PyObject; 364 | 365 | fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result { 366 | formatter.write_str("any valid JSON value") 367 | } 368 | 369 | fn visit_bool(self, value: bool) -> Result 370 | where 371 | E: de::Error, 372 | { 373 | Ok(value.to_object(self.py)) 374 | } 375 | 376 | fn visit_i64(self, value: i64) -> Result 377 | where 378 | E: de::Error, 379 | { 380 | match self.parse_int { 381 | Some(parser) => self.parse_primitive(value, parser), 382 | None => Ok(value.to_object(self.py)), 383 | } 384 | } 385 | 386 | fn visit_u64(self, value: u64) -> Result 387 | where 388 | E: de::Error, 389 | { 390 | match self.parse_int { 391 | Some(parser) => self.parse_primitive(value, parser), 392 | None => Ok(value.to_object(self.py)), 393 | } 394 | } 395 | 396 | fn visit_f64(self, value: f64) -> Result 397 | where 398 | E: de::Error, 399 | { 400 | match self.parse_float { 401 | Some(parser) => self.parse_primitive(value, parser), 402 | None => Ok(value.to_object(self.py)), 403 | } 404 | } 405 | 406 | fn visit_str(self, value: &str) -> Result 407 | where 408 | E: de::Error, 409 | { 410 | Ok(value.to_object(self.py)) 411 | } 412 | 413 | fn visit_unit(self) -> Result { 414 | Ok(self.py.None()) 415 | } 416 | 417 | fn visit_seq(self, mut seq: A) -> Result 418 | where 419 | A: SeqAccess<'de>, 420 | { 421 | let mut elements = Vec::new(); 422 | 423 | while let Some(elem) = seq.next_element_seed(self)? { 424 | elements.push(elem); 425 | } 426 | 427 | Ok(elements.to_object(self.py)) 428 | } 429 | 430 | fn visit_map(self, mut map: A) -> Result 431 | where 432 | A: MapAccess<'de>, 433 | { 434 | let mut entries = BTreeMap::new(); 435 | 436 | while let Some((key, value)) = map.next_entry_seed(PhantomData::, self)? { 437 | entries.insert(key, value); 438 | } 439 | 440 | Ok(entries.to_object(self.py)) 441 | } 442 | } 443 | -------------------------------------------------------------------------------- /Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | version = 3 4 | 5 | [[package]] 6 | name = "abnf" 7 | version = "0.12.0" 8 | source = "registry+https://github.com/rust-lang/crates.io-index" 9 | checksum = "33741baa462d86e43fdec5e8ffca7c6ac82847ad06cbfb382c1bdbf527de9e6b" 10 | dependencies = [ 11 | "abnf-core", 12 | "nom", 13 | ] 14 | 15 | [[package]] 16 | name = "abnf-core" 17 | version = "0.5.0" 18 | source = "registry+https://github.com/rust-lang/crates.io-index" 19 | checksum = "c44e09c43ae1c368fb91a03a566472d0087c26cf7e1b9e8e289c14ede681dd7d" 20 | dependencies = [ 21 | "nom", 22 | ] 23 | 24 | [[package]] 25 | name = "abnf_to_pest" 26 | version = "0.5.1" 27 | source = "registry+https://github.com/rust-lang/crates.io-index" 28 | checksum = "939d59666dd9a7964a3a5312b9d24c9c107630752ee64f2dd5038189a23fe331" 29 | dependencies = [ 30 | "abnf", 31 | "indexmap", 32 | "itertools", 33 | "pretty", 34 | ] 35 | 36 | [[package]] 37 | name = "annotate-snippets" 38 | version = "0.9.1" 39 | source = "registry+https://github.com/rust-lang/crates.io-index" 40 | checksum = "c3b9d411ecbaf79885c6df4d75fff75858d5995ff25385657a28af47e82f9c36" 41 | dependencies = [ 42 | "unicode-width", 43 | ] 44 | 45 | [[package]] 46 | name = "arrayvec" 47 | version = "0.5.2" 48 | source = "registry+https://github.com/rust-lang/crates.io-index" 49 | checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b" 50 | 51 | [[package]] 52 | name = "autocfg" 53 | version = "1.1.0" 54 | source = "registry+https://github.com/rust-lang/crates.io-index" 55 | checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" 56 | 57 | [[package]] 58 | name = "base64" 59 | version = "0.13.0" 60 | source = "registry+https://github.com/rust-lang/crates.io-index" 61 | checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd" 62 | 63 | [[package]] 64 | name = "bitflags" 65 | version = "1.3.2" 66 | source = "registry+https://github.com/rust-lang/crates.io-index" 67 | checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" 68 | 69 | [[package]] 70 | name = "block-buffer" 71 | version = "0.7.3" 72 | source = "registry+https://github.com/rust-lang/crates.io-index" 73 | checksum = "c0940dc441f31689269e10ac70eb1002a3a1d3ad1390e030043662eb7fe4688b" 74 | dependencies = [ 75 | "block-padding", 76 | "byte-tools", 77 | "byteorder", 78 | "generic-array 0.12.4", 79 | ] 80 | 81 | [[package]] 82 | name = "block-buffer" 83 | version = "0.10.2" 84 | source = "registry+https://github.com/rust-lang/crates.io-index" 85 | checksum = "0bf7fe51849ea569fd452f37822f606a5cabb684dc918707a0193fd4664ff324" 86 | dependencies = [ 87 | "generic-array 0.14.5", 88 | ] 89 | 90 | [[package]] 91 | name = "block-padding" 92 | version = "0.1.5" 93 | source = "registry+https://github.com/rust-lang/crates.io-index" 94 | checksum = "fa79dedbb091f449f1f39e53edf88d5dbe95f895dae6135a8d7b881fb5af73f5" 95 | dependencies = [ 96 | "byte-tools", 97 | ] 98 | 99 | [[package]] 100 | name = "bumpalo" 101 | version = "3.12.0" 102 | source = "registry+https://github.com/rust-lang/crates.io-index" 103 | checksum = "0d261e256854913907f67ed06efbc3338dfe6179796deefc1ff763fc1aee5535" 104 | 105 | [[package]] 106 | name = "byte-tools" 107 | version = "0.3.1" 108 | source = "registry+https://github.com/rust-lang/crates.io-index" 109 | checksum = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7" 110 | 111 | [[package]] 112 | name = "byteorder" 113 | version = "1.4.3" 114 | source = "registry+https://github.com/rust-lang/crates.io-index" 115 | checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" 116 | 117 | [[package]] 118 | name = "bytes" 119 | version = "1.1.0" 120 | source = "registry+https://github.com/rust-lang/crates.io-index" 121 | checksum = "c4872d67bab6358e59559027aa3b9157c53d9358c51423c17554809a8858e0f8" 122 | 123 | [[package]] 124 | name = "cc" 125 | version = "1.0.79" 126 | source = "registry+https://github.com/rust-lang/crates.io-index" 127 | checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f" 128 | 129 | [[package]] 130 | name = "cfg-if" 131 | version = "1.0.0" 132 | source = "registry+https://github.com/rust-lang/crates.io-index" 133 | checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" 134 | 135 | [[package]] 136 | name = "core-foundation" 137 | version = "0.9.3" 138 | source = "registry+https://github.com/rust-lang/crates.io-index" 139 | checksum = "194a7a9e6de53fa55116934067c844d9d749312f75c6f6d0980e8c252f8c2146" 140 | dependencies = [ 141 | "core-foundation-sys", 142 | "libc", 143 | ] 144 | 145 | [[package]] 146 | name = "core-foundation-sys" 147 | version = "0.8.3" 148 | source = "registry+https://github.com/rust-lang/crates.io-index" 149 | checksum = "5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc" 150 | 151 | [[package]] 152 | name = "cpufeatures" 153 | version = "0.2.2" 154 | source = "registry+https://github.com/rust-lang/crates.io-index" 155 | checksum = "59a6001667ab124aebae2a495118e11d30984c3a653e99d86d58971708cf5e4b" 156 | dependencies = [ 157 | "libc", 158 | ] 159 | 160 | [[package]] 161 | name = "crunchy" 162 | version = "0.2.2" 163 | source = "registry+https://github.com/rust-lang/crates.io-index" 164 | checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" 165 | 166 | [[package]] 167 | name = "crypto-common" 168 | version = "0.1.6" 169 | source = "registry+https://github.com/rust-lang/crates.io-index" 170 | checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" 171 | dependencies = [ 172 | "generic-array 0.14.5", 173 | "typenum", 174 | ] 175 | 176 | [[package]] 177 | name = "dhall" 178 | version = "0.1.16" 179 | dependencies = [ 180 | "openssl", 181 | "pyo3", 182 | "serde", 183 | "serde_derive", 184 | "serde_dhall", 185 | "serde_json", 186 | "thiserror", 187 | ] 188 | 189 | [[package]] 190 | name = "dhall" 191 | version = "0.12.0" 192 | source = "registry+https://github.com/rust-lang/crates.io-index" 193 | checksum = "ec26264de25a8e3642fbb37abb24a6c6be9e19795444e6cf1bb88be5c2d55cc7" 194 | dependencies = [ 195 | "abnf_to_pest", 196 | "annotate-snippets", 197 | "elsa", 198 | "half 2.1.0", 199 | "hex", 200 | "home", 201 | "itertools", 202 | "lazy_static", 203 | "minicbor", 204 | "once_cell", 205 | "percent-encoding", 206 | "pest", 207 | "pest_consume", 208 | "pest_generator", 209 | "quote", 210 | "reqwest", 211 | "sha2", 212 | "url", 213 | ] 214 | 215 | [[package]] 216 | name = "dhall_proc_macros" 217 | version = "0.6.1" 218 | source = "registry+https://github.com/rust-lang/crates.io-index" 219 | checksum = "efcdb228bf802b21cd843e5ac3959b6255966238e5ec06d2e4bc6b9935475653" 220 | dependencies = [ 221 | "proc-macro2", 222 | "quote", 223 | "syn 1.0.105", 224 | ] 225 | 226 | [[package]] 227 | name = "digest" 228 | version = "0.8.1" 229 | source = "registry+https://github.com/rust-lang/crates.io-index" 230 | checksum = "f3d0c8c8752312f9713efd397ff63acb9f85585afbf179282e720e7704954dd5" 231 | dependencies = [ 232 | "generic-array 0.12.4", 233 | ] 234 | 235 | [[package]] 236 | name = "digest" 237 | version = "0.10.3" 238 | source = "registry+https://github.com/rust-lang/crates.io-index" 239 | checksum = "f2fb860ca6fafa5552fb6d0e816a69c8e49f0908bf524e30a90d97c85892d506" 240 | dependencies = [ 241 | "block-buffer 0.10.2", 242 | "crypto-common", 243 | ] 244 | 245 | [[package]] 246 | name = "doc-comment" 247 | version = "0.3.3" 248 | source = "registry+https://github.com/rust-lang/crates.io-index" 249 | checksum = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10" 250 | 251 | [[package]] 252 | name = "either" 253 | version = "1.6.1" 254 | source = "registry+https://github.com/rust-lang/crates.io-index" 255 | checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457" 256 | 257 | [[package]] 258 | name = "elsa" 259 | version = "1.7.0" 260 | source = "registry+https://github.com/rust-lang/crates.io-index" 261 | checksum = "2b4b5d23ed6b6948d68240aafa4ac98e568c9a020efd9d4201a6288bc3006e09" 262 | dependencies = [ 263 | "stable_deref_trait", 264 | ] 265 | 266 | [[package]] 267 | name = "encoding_rs" 268 | version = "0.8.30" 269 | source = "registry+https://github.com/rust-lang/crates.io-index" 270 | checksum = "7896dc8abb250ffdda33912550faa54c88ec8b998dec0b2c55ab224921ce11df" 271 | dependencies = [ 272 | "cfg-if", 273 | ] 274 | 275 | [[package]] 276 | name = "fake-simd" 277 | version = "0.1.2" 278 | source = "registry+https://github.com/rust-lang/crates.io-index" 279 | checksum = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed" 280 | 281 | [[package]] 282 | name = "fastrand" 283 | version = "1.7.0" 284 | source = "registry+https://github.com/rust-lang/crates.io-index" 285 | checksum = "c3fcf0cee53519c866c09b5de1f6c56ff9d647101f81c1964fa632e148896cdf" 286 | dependencies = [ 287 | "instant", 288 | ] 289 | 290 | [[package]] 291 | name = "fnv" 292 | version = "1.0.7" 293 | source = "registry+https://github.com/rust-lang/crates.io-index" 294 | checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" 295 | 296 | [[package]] 297 | name = "foreign-types" 298 | version = "0.3.2" 299 | source = "registry+https://github.com/rust-lang/crates.io-index" 300 | checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" 301 | dependencies = [ 302 | "foreign-types-shared", 303 | ] 304 | 305 | [[package]] 306 | name = "foreign-types-shared" 307 | version = "0.1.1" 308 | source = "registry+https://github.com/rust-lang/crates.io-index" 309 | checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" 310 | 311 | [[package]] 312 | name = "form_urlencoded" 313 | version = "1.0.1" 314 | source = "registry+https://github.com/rust-lang/crates.io-index" 315 | checksum = "5fc25a87fa4fd2094bffb06925852034d90a17f0d1e05197d4956d3555752191" 316 | dependencies = [ 317 | "matches", 318 | "percent-encoding", 319 | ] 320 | 321 | [[package]] 322 | name = "futures-channel" 323 | version = "0.3.21" 324 | source = "registry+https://github.com/rust-lang/crates.io-index" 325 | checksum = "c3083ce4b914124575708913bca19bfe887522d6e2e6d0952943f5eac4a74010" 326 | dependencies = [ 327 | "futures-core", 328 | ] 329 | 330 | [[package]] 331 | name = "futures-core" 332 | version = "0.3.21" 333 | source = "registry+https://github.com/rust-lang/crates.io-index" 334 | checksum = "0c09fd04b7e4073ac7156a9539b57a484a8ea920f79c7c675d05d289ab6110d3" 335 | 336 | [[package]] 337 | name = "futures-io" 338 | version = "0.3.21" 339 | source = "registry+https://github.com/rust-lang/crates.io-index" 340 | checksum = "fc4045962a5a5e935ee2fdedaa4e08284547402885ab326734432bed5d12966b" 341 | 342 | [[package]] 343 | name = "futures-sink" 344 | version = "0.3.21" 345 | source = "registry+https://github.com/rust-lang/crates.io-index" 346 | checksum = "21163e139fa306126e6eedaf49ecdb4588f939600f0b1e770f4205ee4b7fa868" 347 | 348 | [[package]] 349 | name = "futures-task" 350 | version = "0.3.21" 351 | source = "registry+https://github.com/rust-lang/crates.io-index" 352 | checksum = "57c66a976bf5909d801bbef33416c41372779507e7a6b3a5e25e4749c58f776a" 353 | 354 | [[package]] 355 | name = "futures-util" 356 | version = "0.3.21" 357 | source = "registry+https://github.com/rust-lang/crates.io-index" 358 | checksum = "d8b7abd5d659d9b90c8cba917f6ec750a74e2dc23902ef9cd4cc8c8b22e6036a" 359 | dependencies = [ 360 | "futures-core", 361 | "futures-io", 362 | "futures-task", 363 | "memchr", 364 | "pin-project-lite", 365 | "pin-utils", 366 | "slab", 367 | ] 368 | 369 | [[package]] 370 | name = "generic-array" 371 | version = "0.12.4" 372 | source = "registry+https://github.com/rust-lang/crates.io-index" 373 | checksum = "ffdf9f34f1447443d37393cc6c2b8313aebddcd96906caf34e54c68d8e57d7bd" 374 | dependencies = [ 375 | "typenum", 376 | ] 377 | 378 | [[package]] 379 | name = "generic-array" 380 | version = "0.14.5" 381 | source = "registry+https://github.com/rust-lang/crates.io-index" 382 | checksum = "fd48d33ec7f05fbfa152300fdad764757cbded343c1aa1cff2fbaf4134851803" 383 | dependencies = [ 384 | "typenum", 385 | "version_check", 386 | ] 387 | 388 | [[package]] 389 | name = "h2" 390 | version = "0.3.17" 391 | source = "registry+https://github.com/rust-lang/crates.io-index" 392 | checksum = "66b91535aa35fea1523ad1b86cb6b53c28e0ae566ba4a460f4457e936cad7c6f" 393 | dependencies = [ 394 | "bytes", 395 | "fnv", 396 | "futures-core", 397 | "futures-sink", 398 | "futures-util", 399 | "http", 400 | "indexmap", 401 | "slab", 402 | "tokio", 403 | "tokio-util", 404 | "tracing", 405 | ] 406 | 407 | [[package]] 408 | name = "half" 409 | version = "1.8.2" 410 | source = "registry+https://github.com/rust-lang/crates.io-index" 411 | checksum = "eabb4a44450da02c90444cf74558da904edde8fb4e9035a9a6a4e15445af0bd7" 412 | 413 | [[package]] 414 | name = "half" 415 | version = "2.1.0" 416 | source = "registry+https://github.com/rust-lang/crates.io-index" 417 | checksum = "ad6a9459c9c30b177b925162351f97e7d967c7ea8bab3b8352805327daf45554" 418 | dependencies = [ 419 | "crunchy", 420 | ] 421 | 422 | [[package]] 423 | name = "hashbrown" 424 | version = "0.11.2" 425 | source = "registry+https://github.com/rust-lang/crates.io-index" 426 | checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e" 427 | 428 | [[package]] 429 | name = "hermit-abi" 430 | version = "0.1.19" 431 | source = "registry+https://github.com/rust-lang/crates.io-index" 432 | checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" 433 | dependencies = [ 434 | "libc", 435 | ] 436 | 437 | [[package]] 438 | name = "hex" 439 | version = "0.4.3" 440 | source = "registry+https://github.com/rust-lang/crates.io-index" 441 | checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" 442 | 443 | [[package]] 444 | name = "home" 445 | version = "0.5.3" 446 | source = "registry+https://github.com/rust-lang/crates.io-index" 447 | checksum = "2456aef2e6b6a9784192ae780c0f15bc57df0e918585282325e8c8ac27737654" 448 | dependencies = [ 449 | "winapi", 450 | ] 451 | 452 | [[package]] 453 | name = "http" 454 | version = "0.2.6" 455 | source = "registry+https://github.com/rust-lang/crates.io-index" 456 | checksum = "31f4c6746584866f0feabcc69893c5b51beef3831656a968ed7ae254cdc4fd03" 457 | dependencies = [ 458 | "bytes", 459 | "fnv", 460 | "itoa", 461 | ] 462 | 463 | [[package]] 464 | name = "http-body" 465 | version = "0.4.4" 466 | source = "registry+https://github.com/rust-lang/crates.io-index" 467 | checksum = "1ff4f84919677303da5f147645dbea6b1881f368d03ac84e1dc09031ebd7b2c6" 468 | dependencies = [ 469 | "bytes", 470 | "http", 471 | "pin-project-lite", 472 | ] 473 | 474 | [[package]] 475 | name = "httparse" 476 | version = "1.6.0" 477 | source = "registry+https://github.com/rust-lang/crates.io-index" 478 | checksum = "9100414882e15fb7feccb4897e5f0ff0ff1ca7d1a86a23208ada4d7a18e6c6c4" 479 | 480 | [[package]] 481 | name = "httpdate" 482 | version = "1.0.2" 483 | source = "registry+https://github.com/rust-lang/crates.io-index" 484 | checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421" 485 | 486 | [[package]] 487 | name = "hyper" 488 | version = "0.14.18" 489 | source = "registry+https://github.com/rust-lang/crates.io-index" 490 | checksum = "b26ae0a80afebe130861d90abf98e3814a4f28a4c6ffeb5ab8ebb2be311e0ef2" 491 | dependencies = [ 492 | "bytes", 493 | "futures-channel", 494 | "futures-core", 495 | "futures-util", 496 | "h2", 497 | "http", 498 | "http-body", 499 | "httparse", 500 | "httpdate", 501 | "itoa", 502 | "pin-project-lite", 503 | "socket2", 504 | "tokio", 505 | "tower-service", 506 | "tracing", 507 | "want", 508 | ] 509 | 510 | [[package]] 511 | name = "hyper-tls" 512 | version = "0.5.0" 513 | source = "registry+https://github.com/rust-lang/crates.io-index" 514 | checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" 515 | dependencies = [ 516 | "bytes", 517 | "hyper", 518 | "native-tls", 519 | "tokio", 520 | "tokio-native-tls", 521 | ] 522 | 523 | [[package]] 524 | name = "idna" 525 | version = "0.2.3" 526 | source = "registry+https://github.com/rust-lang/crates.io-index" 527 | checksum = "418a0a6fab821475f634efe3ccc45c013f742efe03d853e8d3355d5cb850ecf8" 528 | dependencies = [ 529 | "matches", 530 | "unicode-bidi", 531 | "unicode-normalization", 532 | ] 533 | 534 | [[package]] 535 | name = "indexmap" 536 | version = "1.8.1" 537 | source = "registry+https://github.com/rust-lang/crates.io-index" 538 | checksum = "0f647032dfaa1f8b6dc29bd3edb7bbef4861b8b8007ebb118d6db284fd59f6ee" 539 | dependencies = [ 540 | "autocfg", 541 | "hashbrown", 542 | ] 543 | 544 | [[package]] 545 | name = "indoc" 546 | version = "1.0.4" 547 | source = "registry+https://github.com/rust-lang/crates.io-index" 548 | checksum = "e7906a9fababaeacb774f72410e497a1d18de916322e33797bb2cd29baa23c9e" 549 | dependencies = [ 550 | "unindent", 551 | ] 552 | 553 | [[package]] 554 | name = "instant" 555 | version = "0.1.12" 556 | source = "registry+https://github.com/rust-lang/crates.io-index" 557 | checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" 558 | dependencies = [ 559 | "cfg-if", 560 | ] 561 | 562 | [[package]] 563 | name = "ipnet" 564 | version = "2.4.0" 565 | source = "registry+https://github.com/rust-lang/crates.io-index" 566 | checksum = "35e70ee094dc02fd9c13fdad4940090f22dbd6ac7c9e7094a46cf0232a50bc7c" 567 | 568 | [[package]] 569 | name = "itertools" 570 | version = "0.10.3" 571 | source = "registry+https://github.com/rust-lang/crates.io-index" 572 | checksum = "a9a9d19fa1e79b6215ff29b9d6880b706147f16e9b1dbb1e4e5947b5b02bc5e3" 573 | dependencies = [ 574 | "either", 575 | ] 576 | 577 | [[package]] 578 | name = "itoa" 579 | version = "1.0.1" 580 | source = "registry+https://github.com/rust-lang/crates.io-index" 581 | checksum = "1aab8fc367588b89dcee83ab0fd66b72b50b72fa1904d7095045ace2b0c81c35" 582 | 583 | [[package]] 584 | name = "js-sys" 585 | version = "0.3.56" 586 | source = "registry+https://github.com/rust-lang/crates.io-index" 587 | checksum = "a38fc24e30fd564ce974c02bf1d337caddff65be6cc4735a1f7eab22a7440f04" 588 | dependencies = [ 589 | "wasm-bindgen", 590 | ] 591 | 592 | [[package]] 593 | name = "lazy_static" 594 | version = "1.4.0" 595 | source = "registry+https://github.com/rust-lang/crates.io-index" 596 | checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" 597 | 598 | [[package]] 599 | name = "libc" 600 | version = "0.2.121" 601 | source = "registry+https://github.com/rust-lang/crates.io-index" 602 | checksum = "efaa7b300f3b5fe8eb6bf21ce3895e1751d9665086af2d64b42f19701015ff4f" 603 | 604 | [[package]] 605 | name = "lock_api" 606 | version = "0.4.6" 607 | source = "registry+https://github.com/rust-lang/crates.io-index" 608 | checksum = "88943dd7ef4a2e5a4bfa2753aaab3013e34ce2533d1996fb18ef591e315e2b3b" 609 | dependencies = [ 610 | "scopeguard", 611 | ] 612 | 613 | [[package]] 614 | name = "log" 615 | version = "0.4.16" 616 | source = "registry+https://github.com/rust-lang/crates.io-index" 617 | checksum = "6389c490849ff5bc16be905ae24bc913a9c8892e19b2341dbc175e14c341c2b8" 618 | dependencies = [ 619 | "cfg-if", 620 | ] 621 | 622 | [[package]] 623 | name = "maplit" 624 | version = "1.0.2" 625 | source = "registry+https://github.com/rust-lang/crates.io-index" 626 | checksum = "3e2e65a1a2e43cfcb47a895c4c8b10d1f4a61097f9f254f183aee60cad9c651d" 627 | 628 | [[package]] 629 | name = "matches" 630 | version = "0.1.9" 631 | source = "registry+https://github.com/rust-lang/crates.io-index" 632 | checksum = "a3e378b66a060d48947b590737b30a1be76706c8dd7b8ba0f2fe3989c68a853f" 633 | 634 | [[package]] 635 | name = "memchr" 636 | version = "2.4.1" 637 | source = "registry+https://github.com/rust-lang/crates.io-index" 638 | checksum = "308cc39be01b73d0d18f82a0e7b2a3df85245f84af96fdddc5d202d27e47b86a" 639 | 640 | [[package]] 641 | name = "memoffset" 642 | version = "0.9.0" 643 | source = "registry+https://github.com/rust-lang/crates.io-index" 644 | checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c" 645 | dependencies = [ 646 | "autocfg", 647 | ] 648 | 649 | [[package]] 650 | name = "mime" 651 | version = "0.3.16" 652 | source = "registry+https://github.com/rust-lang/crates.io-index" 653 | checksum = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d" 654 | 655 | [[package]] 656 | name = "minicbor" 657 | version = "0.18.0" 658 | source = "registry+https://github.com/rust-lang/crates.io-index" 659 | checksum = "2a20020e8e2d1881d8736f64011bb5ff99f1db9947ce3089706945c8915695cb" 660 | dependencies = [ 661 | "half 1.8.2", 662 | "minicbor-derive", 663 | ] 664 | 665 | [[package]] 666 | name = "minicbor-derive" 667 | version = "0.12.0" 668 | source = "registry+https://github.com/rust-lang/crates.io-index" 669 | checksum = "8608fb1c805b5b6b3d5ab7bd95c40c396df622b64d77b2d621a5eae1eed050ee" 670 | dependencies = [ 671 | "proc-macro2", 672 | "quote", 673 | "syn 1.0.105", 674 | ] 675 | 676 | [[package]] 677 | name = "minimal-lexical" 678 | version = "0.2.1" 679 | source = "registry+https://github.com/rust-lang/crates.io-index" 680 | checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" 681 | 682 | [[package]] 683 | name = "mio" 684 | version = "0.8.5" 685 | source = "registry+https://github.com/rust-lang/crates.io-index" 686 | checksum = "e5d732bc30207a6423068df043e3d02e0735b155ad7ce1a6f76fe2baa5b158de" 687 | dependencies = [ 688 | "libc", 689 | "log", 690 | "wasi", 691 | "windows-sys", 692 | ] 693 | 694 | [[package]] 695 | name = "native-tls" 696 | version = "0.2.10" 697 | source = "registry+https://github.com/rust-lang/crates.io-index" 698 | checksum = "fd7e2f3618557f980e0b17e8856252eee3c97fa12c54dff0ca290fb6266ca4a9" 699 | dependencies = [ 700 | "lazy_static", 701 | "libc", 702 | "log", 703 | "openssl", 704 | "openssl-probe", 705 | "openssl-sys", 706 | "schannel", 707 | "security-framework", 708 | "security-framework-sys", 709 | "tempfile", 710 | ] 711 | 712 | [[package]] 713 | name = "nom" 714 | version = "7.1.1" 715 | source = "registry+https://github.com/rust-lang/crates.io-index" 716 | checksum = "a8903e5a29a317527874d0402f867152a3d21c908bb0b933e416c65e301d4c36" 717 | dependencies = [ 718 | "memchr", 719 | "minimal-lexical", 720 | ] 721 | 722 | [[package]] 723 | name = "num_cpus" 724 | version = "1.13.1" 725 | source = "registry+https://github.com/rust-lang/crates.io-index" 726 | checksum = "19e64526ebdee182341572e50e9ad03965aa510cd94427a4549448f285e957a1" 727 | dependencies = [ 728 | "hermit-abi", 729 | "libc", 730 | ] 731 | 732 | [[package]] 733 | name = "once_cell" 734 | version = "1.10.0" 735 | source = "registry+https://github.com/rust-lang/crates.io-index" 736 | checksum = "87f3e037eac156d1775da914196f0f37741a274155e34a0b7e427c35d2a2ecb9" 737 | 738 | [[package]] 739 | name = "opaque-debug" 740 | version = "0.2.3" 741 | source = "registry+https://github.com/rust-lang/crates.io-index" 742 | checksum = "2839e79665f131bdb5782e51f2c6c9599c133c6098982a54c794358bf432529c" 743 | 744 | [[package]] 745 | name = "openssl" 746 | version = "0.10.55" 747 | source = "registry+https://github.com/rust-lang/crates.io-index" 748 | checksum = "345df152bc43501c5eb9e4654ff05f794effb78d4efe3d53abc158baddc0703d" 749 | dependencies = [ 750 | "bitflags", 751 | "cfg-if", 752 | "foreign-types", 753 | "libc", 754 | "once_cell", 755 | "openssl-macros", 756 | "openssl-sys", 757 | ] 758 | 759 | [[package]] 760 | name = "openssl-macros" 761 | version = "0.1.0" 762 | source = "registry+https://github.com/rust-lang/crates.io-index" 763 | checksum = "b501e44f11665960c7e7fcf062c7d96a14ade4aa98116c004b2e37b5be7d736c" 764 | dependencies = [ 765 | "proc-macro2", 766 | "quote", 767 | "syn 1.0.105", 768 | ] 769 | 770 | [[package]] 771 | name = "openssl-probe" 772 | version = "0.1.5" 773 | source = "registry+https://github.com/rust-lang/crates.io-index" 774 | checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" 775 | 776 | [[package]] 777 | name = "openssl-src" 778 | version = "111.25.2+1.1.1t" 779 | source = "registry+https://github.com/rust-lang/crates.io-index" 780 | checksum = "320708a054ad9b3bf314688b5db87cf4d6683d64cfc835e2337924ae62bf4431" 781 | dependencies = [ 782 | "cc", 783 | ] 784 | 785 | [[package]] 786 | name = "openssl-sys" 787 | version = "0.9.90" 788 | source = "registry+https://github.com/rust-lang/crates.io-index" 789 | checksum = "374533b0e45f3a7ced10fcaeccca020e66656bc03dac384f852e4e5a7a8104a6" 790 | dependencies = [ 791 | "cc", 792 | "libc", 793 | "openssl-src", 794 | "pkg-config", 795 | "vcpkg", 796 | ] 797 | 798 | [[package]] 799 | name = "parking_lot" 800 | version = "0.11.2" 801 | source = "registry+https://github.com/rust-lang/crates.io-index" 802 | checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" 803 | dependencies = [ 804 | "instant", 805 | "lock_api", 806 | "parking_lot_core", 807 | ] 808 | 809 | [[package]] 810 | name = "parking_lot_core" 811 | version = "0.8.5" 812 | source = "registry+https://github.com/rust-lang/crates.io-index" 813 | checksum = "d76e8e1493bcac0d2766c42737f34458f1c8c50c0d23bcb24ea953affb273216" 814 | dependencies = [ 815 | "cfg-if", 816 | "instant", 817 | "libc", 818 | "redox_syscall", 819 | "smallvec", 820 | "winapi", 821 | ] 822 | 823 | [[package]] 824 | name = "percent-encoding" 825 | version = "2.1.0" 826 | source = "registry+https://github.com/rust-lang/crates.io-index" 827 | checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" 828 | 829 | [[package]] 830 | name = "pest" 831 | version = "2.1.3" 832 | source = "registry+https://github.com/rust-lang/crates.io-index" 833 | checksum = "10f4872ae94d7b90ae48754df22fd42ad52ce740b8f370b03da4835417403e53" 834 | dependencies = [ 835 | "ucd-trie", 836 | ] 837 | 838 | [[package]] 839 | name = "pest_consume" 840 | version = "1.1.1" 841 | source = "registry+https://github.com/rust-lang/crates.io-index" 842 | checksum = "dcb7c2ab7ca422b1f9b9e821c96667dc6675885c8a986cb379f7fac36b229085" 843 | dependencies = [ 844 | "pest", 845 | "pest_consume_macros", 846 | "pest_derive", 847 | ] 848 | 849 | [[package]] 850 | name = "pest_consume_macros" 851 | version = "1.1.0" 852 | source = "registry+https://github.com/rust-lang/crates.io-index" 853 | checksum = "9d8630a7a899cb344ec1c16ba0a6b24240029af34bdc0a21f84e411d7f793f29" 854 | dependencies = [ 855 | "proc-macro2", 856 | "quote", 857 | "syn 1.0.105", 858 | ] 859 | 860 | [[package]] 861 | name = "pest_derive" 862 | version = "2.1.0" 863 | source = "registry+https://github.com/rust-lang/crates.io-index" 864 | checksum = "833d1ae558dc601e9a60366421196a8d94bc0ac980476d0b67e1d0988d72b2d0" 865 | dependencies = [ 866 | "pest", 867 | "pest_generator", 868 | ] 869 | 870 | [[package]] 871 | name = "pest_generator" 872 | version = "2.1.3" 873 | source = "registry+https://github.com/rust-lang/crates.io-index" 874 | checksum = "99b8db626e31e5b81787b9783425769681b347011cc59471e33ea46d2ea0cf55" 875 | dependencies = [ 876 | "pest", 877 | "pest_meta", 878 | "proc-macro2", 879 | "quote", 880 | "syn 1.0.105", 881 | ] 882 | 883 | [[package]] 884 | name = "pest_meta" 885 | version = "2.1.3" 886 | source = "registry+https://github.com/rust-lang/crates.io-index" 887 | checksum = "54be6e404f5317079812fc8f9f5279de376d8856929e21c184ecf6bbd692a11d" 888 | dependencies = [ 889 | "maplit", 890 | "pest", 891 | "sha-1", 892 | ] 893 | 894 | [[package]] 895 | name = "pin-project-lite" 896 | version = "0.2.8" 897 | source = "registry+https://github.com/rust-lang/crates.io-index" 898 | checksum = "e280fbe77cc62c91527259e9442153f4688736748d24660126286329742b4c6c" 899 | 900 | [[package]] 901 | name = "pin-utils" 902 | version = "0.1.0" 903 | source = "registry+https://github.com/rust-lang/crates.io-index" 904 | checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" 905 | 906 | [[package]] 907 | name = "pkg-config" 908 | version = "0.3.24" 909 | source = "registry+https://github.com/rust-lang/crates.io-index" 910 | checksum = "58893f751c9b0412871a09abd62ecd2a00298c6c83befa223ef98c52aef40cbe" 911 | 912 | [[package]] 913 | name = "pretty" 914 | version = "0.11.3" 915 | source = "registry+https://github.com/rust-lang/crates.io-index" 916 | checksum = "83f3aa1e3ca87d3b124db7461265ac176b40c277f37e503eaa29c9c75c037846" 917 | dependencies = [ 918 | "arrayvec", 919 | "log", 920 | "typed-arena", 921 | "unicode-segmentation", 922 | ] 923 | 924 | [[package]] 925 | name = "proc-macro2" 926 | version = "1.0.64" 927 | source = "registry+https://github.com/rust-lang/crates.io-index" 928 | checksum = "78803b62cbf1f46fde80d7c0e803111524b9877184cfe7c3033659490ac7a7da" 929 | dependencies = [ 930 | "unicode-ident", 931 | ] 932 | 933 | [[package]] 934 | name = "pyo3" 935 | version = "0.19.1" 936 | source = "registry+https://github.com/rust-lang/crates.io-index" 937 | checksum = "ffb88ae05f306b4bfcde40ac4a51dc0b05936a9207a4b75b798c7729c4258a59" 938 | dependencies = [ 939 | "cfg-if", 940 | "indoc", 941 | "libc", 942 | "memoffset", 943 | "parking_lot", 944 | "pyo3-build-config", 945 | "pyo3-ffi", 946 | "pyo3-macros", 947 | "unindent", 948 | ] 949 | 950 | [[package]] 951 | name = "pyo3-build-config" 952 | version = "0.19.1" 953 | source = "registry+https://github.com/rust-lang/crates.io-index" 954 | checksum = "554db24f0b3c180a9c0b1268f91287ab3f17c162e15b54caaae5a6b3773396b0" 955 | dependencies = [ 956 | "once_cell", 957 | "target-lexicon", 958 | ] 959 | 960 | [[package]] 961 | name = "pyo3-ffi" 962 | version = "0.19.1" 963 | source = "registry+https://github.com/rust-lang/crates.io-index" 964 | checksum = "922ede8759e8600ad4da3195ae41259654b9c55da4f7eec84a0ccc7d067a70a4" 965 | dependencies = [ 966 | "libc", 967 | "pyo3-build-config", 968 | ] 969 | 970 | [[package]] 971 | name = "pyo3-macros" 972 | version = "0.19.1" 973 | source = "registry+https://github.com/rust-lang/crates.io-index" 974 | checksum = "8a5caec6a1dd355964a841fcbeeb1b89fe4146c87295573f94228911af3cc5a2" 975 | dependencies = [ 976 | "proc-macro2", 977 | "pyo3-macros-backend", 978 | "quote", 979 | "syn 1.0.105", 980 | ] 981 | 982 | [[package]] 983 | name = "pyo3-macros-backend" 984 | version = "0.19.1" 985 | source = "registry+https://github.com/rust-lang/crates.io-index" 986 | checksum = "e0b78ccbb160db1556cdb6fd96c50334c5d4ec44dc5e0a968d0a1208fa0efa8b" 987 | dependencies = [ 988 | "proc-macro2", 989 | "quote", 990 | "syn 1.0.105", 991 | ] 992 | 993 | [[package]] 994 | name = "quote" 995 | version = "1.0.29" 996 | source = "registry+https://github.com/rust-lang/crates.io-index" 997 | checksum = "573015e8ab27661678357f27dc26460738fd2b6c86e46f386fde94cb5d913105" 998 | dependencies = [ 999 | "proc-macro2", 1000 | ] 1001 | 1002 | [[package]] 1003 | name = "redox_syscall" 1004 | version = "0.2.12" 1005 | source = "registry+https://github.com/rust-lang/crates.io-index" 1006 | checksum = "8ae183fc1b06c149f0c1793e1eb447c8b04bfe46d48e9e48bfb8d2d7ed64ecf0" 1007 | dependencies = [ 1008 | "bitflags", 1009 | ] 1010 | 1011 | [[package]] 1012 | name = "remove_dir_all" 1013 | version = "0.5.3" 1014 | source = "registry+https://github.com/rust-lang/crates.io-index" 1015 | checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7" 1016 | dependencies = [ 1017 | "winapi", 1018 | ] 1019 | 1020 | [[package]] 1021 | name = "reqwest" 1022 | version = "0.11.10" 1023 | source = "registry+https://github.com/rust-lang/crates.io-index" 1024 | checksum = "46a1f7aa4f35e5e8b4160449f51afc758f0ce6454315a9fa7d0d113e958c41eb" 1025 | dependencies = [ 1026 | "base64", 1027 | "bytes", 1028 | "encoding_rs", 1029 | "futures-core", 1030 | "futures-util", 1031 | "h2", 1032 | "http", 1033 | "http-body", 1034 | "hyper", 1035 | "hyper-tls", 1036 | "ipnet", 1037 | "js-sys", 1038 | "lazy_static", 1039 | "log", 1040 | "mime", 1041 | "native-tls", 1042 | "percent-encoding", 1043 | "pin-project-lite", 1044 | "serde", 1045 | "serde_json", 1046 | "serde_urlencoded", 1047 | "tokio", 1048 | "tokio-native-tls", 1049 | "url", 1050 | "wasm-bindgen", 1051 | "wasm-bindgen-futures", 1052 | "web-sys", 1053 | "winreg", 1054 | ] 1055 | 1056 | [[package]] 1057 | name = "ryu" 1058 | version = "1.0.9" 1059 | source = "registry+https://github.com/rust-lang/crates.io-index" 1060 | checksum = "73b4b750c782965c211b42f022f59af1fbceabdd026623714f104152f1ec149f" 1061 | 1062 | [[package]] 1063 | name = "schannel" 1064 | version = "0.1.19" 1065 | source = "registry+https://github.com/rust-lang/crates.io-index" 1066 | checksum = "8f05ba609c234e60bee0d547fe94a4c7e9da733d1c962cf6e59efa4cd9c8bc75" 1067 | dependencies = [ 1068 | "lazy_static", 1069 | "winapi", 1070 | ] 1071 | 1072 | [[package]] 1073 | name = "scopeguard" 1074 | version = "1.1.0" 1075 | source = "registry+https://github.com/rust-lang/crates.io-index" 1076 | checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" 1077 | 1078 | [[package]] 1079 | name = "security-framework" 1080 | version = "2.6.1" 1081 | source = "registry+https://github.com/rust-lang/crates.io-index" 1082 | checksum = "2dc14f172faf8a0194a3aded622712b0de276821addc574fa54fc0a1167e10dc" 1083 | dependencies = [ 1084 | "bitflags", 1085 | "core-foundation", 1086 | "core-foundation-sys", 1087 | "libc", 1088 | "security-framework-sys", 1089 | ] 1090 | 1091 | [[package]] 1092 | name = "security-framework-sys" 1093 | version = "2.6.1" 1094 | source = "registry+https://github.com/rust-lang/crates.io-index" 1095 | checksum = "0160a13a177a45bfb43ce71c01580998474f556ad854dcbca936dd2841a5c556" 1096 | dependencies = [ 1097 | "core-foundation-sys", 1098 | "libc", 1099 | ] 1100 | 1101 | [[package]] 1102 | name = "serde" 1103 | version = "1.0.173" 1104 | source = "registry+https://github.com/rust-lang/crates.io-index" 1105 | checksum = "e91f70896d6720bc714a4a57d22fc91f1db634680e65c8efe13323f1fa38d53f" 1106 | dependencies = [ 1107 | "serde_derive", 1108 | ] 1109 | 1110 | [[package]] 1111 | name = "serde_derive" 1112 | version = "1.0.173" 1113 | source = "registry+https://github.com/rust-lang/crates.io-index" 1114 | checksum = "a6250dde8342e0232232be9ca3db7aa40aceb5a3e5dd9bddbc00d99a007cde49" 1115 | dependencies = [ 1116 | "proc-macro2", 1117 | "quote", 1118 | "syn 2.0.25", 1119 | ] 1120 | 1121 | [[package]] 1122 | name = "serde_dhall" 1123 | version = "0.12.1" 1124 | source = "registry+https://github.com/rust-lang/crates.io-index" 1125 | checksum = "655a5c686ad80aef90d2e6bfea3715778623c9a659017c8346bc97eb58f9b27d" 1126 | dependencies = [ 1127 | "dhall 0.12.0", 1128 | "dhall_proc_macros", 1129 | "doc-comment", 1130 | "serde", 1131 | "url", 1132 | ] 1133 | 1134 | [[package]] 1135 | name = "serde_json" 1136 | version = "1.0.103" 1137 | source = "registry+https://github.com/rust-lang/crates.io-index" 1138 | checksum = "d03b412469450d4404fe8499a268edd7f8b79fecb074b0d812ad64ca21f4031b" 1139 | dependencies = [ 1140 | "itoa", 1141 | "ryu", 1142 | "serde", 1143 | ] 1144 | 1145 | [[package]] 1146 | name = "serde_urlencoded" 1147 | version = "0.7.1" 1148 | source = "registry+https://github.com/rust-lang/crates.io-index" 1149 | checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" 1150 | dependencies = [ 1151 | "form_urlencoded", 1152 | "itoa", 1153 | "ryu", 1154 | "serde", 1155 | ] 1156 | 1157 | [[package]] 1158 | name = "sha-1" 1159 | version = "0.8.2" 1160 | source = "registry+https://github.com/rust-lang/crates.io-index" 1161 | checksum = "f7d94d0bede923b3cea61f3f1ff57ff8cdfd77b400fb8f9998949e0cf04163df" 1162 | dependencies = [ 1163 | "block-buffer 0.7.3", 1164 | "digest 0.8.1", 1165 | "fake-simd", 1166 | "opaque-debug", 1167 | ] 1168 | 1169 | [[package]] 1170 | name = "sha2" 1171 | version = "0.10.2" 1172 | source = "registry+https://github.com/rust-lang/crates.io-index" 1173 | checksum = "55deaec60f81eefe3cce0dc50bda92d6d8e88f2a27df7c5033b42afeb1ed2676" 1174 | dependencies = [ 1175 | "cfg-if", 1176 | "cpufeatures", 1177 | "digest 0.10.3", 1178 | ] 1179 | 1180 | [[package]] 1181 | name = "slab" 1182 | version = "0.4.5" 1183 | source = "registry+https://github.com/rust-lang/crates.io-index" 1184 | checksum = "9def91fd1e018fe007022791f865d0ccc9b3a0d5001e01aabb8b40e46000afb5" 1185 | 1186 | [[package]] 1187 | name = "smallvec" 1188 | version = "1.8.0" 1189 | source = "registry+https://github.com/rust-lang/crates.io-index" 1190 | checksum = "f2dd574626839106c320a323308629dcb1acfc96e32a8cba364ddc61ac23ee83" 1191 | 1192 | [[package]] 1193 | name = "socket2" 1194 | version = "0.4.4" 1195 | source = "registry+https://github.com/rust-lang/crates.io-index" 1196 | checksum = "66d72b759436ae32898a2af0a14218dbf55efde3feeb170eb623637db85ee1e0" 1197 | dependencies = [ 1198 | "libc", 1199 | "winapi", 1200 | ] 1201 | 1202 | [[package]] 1203 | name = "stable_deref_trait" 1204 | version = "1.2.0" 1205 | source = "registry+https://github.com/rust-lang/crates.io-index" 1206 | checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" 1207 | 1208 | [[package]] 1209 | name = "syn" 1210 | version = "1.0.105" 1211 | source = "registry+https://github.com/rust-lang/crates.io-index" 1212 | checksum = "60b9b43d45702de4c839cb9b51d9f529c5dd26a4aff255b42b1ebc03e88ee908" 1213 | dependencies = [ 1214 | "proc-macro2", 1215 | "quote", 1216 | "unicode-ident", 1217 | ] 1218 | 1219 | [[package]] 1220 | name = "syn" 1221 | version = "2.0.25" 1222 | source = "registry+https://github.com/rust-lang/crates.io-index" 1223 | checksum = "15e3fc8c0c74267e2df136e5e5fb656a464158aa57624053375eb9c8c6e25ae2" 1224 | dependencies = [ 1225 | "proc-macro2", 1226 | "quote", 1227 | "unicode-ident", 1228 | ] 1229 | 1230 | [[package]] 1231 | name = "target-lexicon" 1232 | version = "0.12.3" 1233 | source = "registry+https://github.com/rust-lang/crates.io-index" 1234 | checksum = "d7fa7e55043acb85fca6b3c01485a2eeb6b69c5d21002e273c79e465f43b7ac1" 1235 | 1236 | [[package]] 1237 | name = "tempfile" 1238 | version = "3.3.0" 1239 | source = "registry+https://github.com/rust-lang/crates.io-index" 1240 | checksum = "5cdb1ef4eaeeaddc8fbd371e5017057064af0911902ef36b39801f67cc6d79e4" 1241 | dependencies = [ 1242 | "cfg-if", 1243 | "fastrand", 1244 | "libc", 1245 | "redox_syscall", 1246 | "remove_dir_all", 1247 | "winapi", 1248 | ] 1249 | 1250 | [[package]] 1251 | name = "thiserror" 1252 | version = "1.0.43" 1253 | source = "registry+https://github.com/rust-lang/crates.io-index" 1254 | checksum = "a35fc5b8971143ca348fa6df4f024d4d55264f3468c71ad1c2f365b0a4d58c42" 1255 | dependencies = [ 1256 | "thiserror-impl", 1257 | ] 1258 | 1259 | [[package]] 1260 | name = "thiserror-impl" 1261 | version = "1.0.43" 1262 | source = "registry+https://github.com/rust-lang/crates.io-index" 1263 | checksum = "463fe12d7993d3b327787537ce8dd4dfa058de32fc2b195ef3cde03dc4771e8f" 1264 | dependencies = [ 1265 | "proc-macro2", 1266 | "quote", 1267 | "syn 2.0.25", 1268 | ] 1269 | 1270 | [[package]] 1271 | name = "tinyvec" 1272 | version = "1.5.1" 1273 | source = "registry+https://github.com/rust-lang/crates.io-index" 1274 | checksum = "2c1c1d5a42b6245520c249549ec267180beaffcc0615401ac8e31853d4b6d8d2" 1275 | dependencies = [ 1276 | "tinyvec_macros", 1277 | ] 1278 | 1279 | [[package]] 1280 | name = "tinyvec_macros" 1281 | version = "0.1.0" 1282 | source = "registry+https://github.com/rust-lang/crates.io-index" 1283 | checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" 1284 | 1285 | [[package]] 1286 | name = "tokio" 1287 | version = "1.25.0" 1288 | source = "registry+https://github.com/rust-lang/crates.io-index" 1289 | checksum = "c8e00990ebabbe4c14c08aca901caed183ecd5c09562a12c824bb53d3c3fd3af" 1290 | dependencies = [ 1291 | "autocfg", 1292 | "bytes", 1293 | "libc", 1294 | "memchr", 1295 | "mio", 1296 | "num_cpus", 1297 | "pin-project-lite", 1298 | "socket2", 1299 | "windows-sys", 1300 | ] 1301 | 1302 | [[package]] 1303 | name = "tokio-native-tls" 1304 | version = "0.3.0" 1305 | source = "registry+https://github.com/rust-lang/crates.io-index" 1306 | checksum = "f7d995660bd2b7f8c1568414c1126076c13fbb725c40112dc0120b78eb9b717b" 1307 | dependencies = [ 1308 | "native-tls", 1309 | "tokio", 1310 | ] 1311 | 1312 | [[package]] 1313 | name = "tokio-util" 1314 | version = "0.7.7" 1315 | source = "registry+https://github.com/rust-lang/crates.io-index" 1316 | checksum = "5427d89453009325de0d8f342c9490009f76e999cb7672d77e46267448f7e6b2" 1317 | dependencies = [ 1318 | "bytes", 1319 | "futures-core", 1320 | "futures-sink", 1321 | "pin-project-lite", 1322 | "tokio", 1323 | "tracing", 1324 | ] 1325 | 1326 | [[package]] 1327 | name = "tower-service" 1328 | version = "0.3.1" 1329 | source = "registry+https://github.com/rust-lang/crates.io-index" 1330 | checksum = "360dfd1d6d30e05fda32ace2c8c70e9c0a9da713275777f5a4dbb8a1893930c6" 1331 | 1332 | [[package]] 1333 | name = "tracing" 1334 | version = "0.1.32" 1335 | source = "registry+https://github.com/rust-lang/crates.io-index" 1336 | checksum = "4a1bdf54a7c28a2bbf701e1d2233f6c77f473486b94bee4f9678da5a148dca7f" 1337 | dependencies = [ 1338 | "cfg-if", 1339 | "pin-project-lite", 1340 | "tracing-core", 1341 | ] 1342 | 1343 | [[package]] 1344 | name = "tracing-core" 1345 | version = "0.1.23" 1346 | source = "registry+https://github.com/rust-lang/crates.io-index" 1347 | checksum = "aa31669fa42c09c34d94d8165dd2012e8ff3c66aca50f3bb226b68f216f2706c" 1348 | dependencies = [ 1349 | "lazy_static", 1350 | ] 1351 | 1352 | [[package]] 1353 | name = "try-lock" 1354 | version = "0.2.3" 1355 | source = "registry+https://github.com/rust-lang/crates.io-index" 1356 | checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" 1357 | 1358 | [[package]] 1359 | name = "typed-arena" 1360 | version = "2.0.1" 1361 | source = "registry+https://github.com/rust-lang/crates.io-index" 1362 | checksum = "0685c84d5d54d1c26f7d3eb96cd41550adb97baed141a761cf335d3d33bcd0ae" 1363 | 1364 | [[package]] 1365 | name = "typenum" 1366 | version = "1.15.0" 1367 | source = "registry+https://github.com/rust-lang/crates.io-index" 1368 | checksum = "dcf81ac59edc17cc8697ff311e8f5ef2d99fcbd9817b34cec66f90b6c3dfd987" 1369 | 1370 | [[package]] 1371 | name = "ucd-trie" 1372 | version = "0.1.3" 1373 | source = "registry+https://github.com/rust-lang/crates.io-index" 1374 | checksum = "56dee185309b50d1f11bfedef0fe6d036842e3fb77413abef29f8f8d1c5d4c1c" 1375 | 1376 | [[package]] 1377 | name = "unicode-bidi" 1378 | version = "0.3.7" 1379 | source = "registry+https://github.com/rust-lang/crates.io-index" 1380 | checksum = "1a01404663e3db436ed2746d9fefef640d868edae3cceb81c3b8d5732fda678f" 1381 | 1382 | [[package]] 1383 | name = "unicode-ident" 1384 | version = "1.0.5" 1385 | source = "registry+https://github.com/rust-lang/crates.io-index" 1386 | checksum = "6ceab39d59e4c9499d4e5a8ee0e2735b891bb7308ac83dfb4e80cad195c9f6f3" 1387 | 1388 | [[package]] 1389 | name = "unicode-normalization" 1390 | version = "0.1.19" 1391 | source = "registry+https://github.com/rust-lang/crates.io-index" 1392 | checksum = "d54590932941a9e9266f0832deed84ebe1bf2e4c9e4a3554d393d18f5e854bf9" 1393 | dependencies = [ 1394 | "tinyvec", 1395 | ] 1396 | 1397 | [[package]] 1398 | name = "unicode-segmentation" 1399 | version = "1.9.0" 1400 | source = "registry+https://github.com/rust-lang/crates.io-index" 1401 | checksum = "7e8820f5d777f6224dc4be3632222971ac30164d4a258d595640799554ebfd99" 1402 | 1403 | [[package]] 1404 | name = "unicode-width" 1405 | version = "0.1.9" 1406 | source = "registry+https://github.com/rust-lang/crates.io-index" 1407 | checksum = "3ed742d4ea2bd1176e236172c8429aaf54486e7ac098db29ffe6529e0ce50973" 1408 | 1409 | [[package]] 1410 | name = "unindent" 1411 | version = "0.1.8" 1412 | source = "registry+https://github.com/rust-lang/crates.io-index" 1413 | checksum = "514672a55d7380da379785a4d70ca8386c8883ff7eaae877be4d2081cebe73d8" 1414 | 1415 | [[package]] 1416 | name = "url" 1417 | version = "2.2.2" 1418 | source = "registry+https://github.com/rust-lang/crates.io-index" 1419 | checksum = "a507c383b2d33b5fc35d1861e77e6b383d158b2da5e14fe51b83dfedf6fd578c" 1420 | dependencies = [ 1421 | "form_urlencoded", 1422 | "idna", 1423 | "matches", 1424 | "percent-encoding", 1425 | ] 1426 | 1427 | [[package]] 1428 | name = "vcpkg" 1429 | version = "0.2.15" 1430 | source = "registry+https://github.com/rust-lang/crates.io-index" 1431 | checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" 1432 | 1433 | [[package]] 1434 | name = "version_check" 1435 | version = "0.9.4" 1436 | source = "registry+https://github.com/rust-lang/crates.io-index" 1437 | checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" 1438 | 1439 | [[package]] 1440 | name = "want" 1441 | version = "0.3.0" 1442 | source = "registry+https://github.com/rust-lang/crates.io-index" 1443 | checksum = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0" 1444 | dependencies = [ 1445 | "log", 1446 | "try-lock", 1447 | ] 1448 | 1449 | [[package]] 1450 | name = "wasi" 1451 | version = "0.11.0+wasi-snapshot-preview1" 1452 | source = "registry+https://github.com/rust-lang/crates.io-index" 1453 | checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" 1454 | 1455 | [[package]] 1456 | name = "wasm-bindgen" 1457 | version = "0.2.79" 1458 | source = "registry+https://github.com/rust-lang/crates.io-index" 1459 | checksum = "25f1af7423d8588a3d840681122e72e6a24ddbcb3f0ec385cac0d12d24256c06" 1460 | dependencies = [ 1461 | "cfg-if", 1462 | "wasm-bindgen-macro", 1463 | ] 1464 | 1465 | [[package]] 1466 | name = "wasm-bindgen-backend" 1467 | version = "0.2.79" 1468 | source = "registry+https://github.com/rust-lang/crates.io-index" 1469 | checksum = "8b21c0df030f5a177f3cba22e9bc4322695ec43e7257d865302900290bcdedca" 1470 | dependencies = [ 1471 | "bumpalo", 1472 | "lazy_static", 1473 | "log", 1474 | "proc-macro2", 1475 | "quote", 1476 | "syn 1.0.105", 1477 | "wasm-bindgen-shared", 1478 | ] 1479 | 1480 | [[package]] 1481 | name = "wasm-bindgen-futures" 1482 | version = "0.4.29" 1483 | source = "registry+https://github.com/rust-lang/crates.io-index" 1484 | checksum = "2eb6ec270a31b1d3c7e266b999739109abce8b6c87e4b31fcfcd788b65267395" 1485 | dependencies = [ 1486 | "cfg-if", 1487 | "js-sys", 1488 | "wasm-bindgen", 1489 | "web-sys", 1490 | ] 1491 | 1492 | [[package]] 1493 | name = "wasm-bindgen-macro" 1494 | version = "0.2.79" 1495 | source = "registry+https://github.com/rust-lang/crates.io-index" 1496 | checksum = "2f4203d69e40a52ee523b2529a773d5ffc1dc0071801c87b3d270b471b80ed01" 1497 | dependencies = [ 1498 | "quote", 1499 | "wasm-bindgen-macro-support", 1500 | ] 1501 | 1502 | [[package]] 1503 | name = "wasm-bindgen-macro-support" 1504 | version = "0.2.79" 1505 | source = "registry+https://github.com/rust-lang/crates.io-index" 1506 | checksum = "bfa8a30d46208db204854cadbb5d4baf5fcf8071ba5bf48190c3e59937962ebc" 1507 | dependencies = [ 1508 | "proc-macro2", 1509 | "quote", 1510 | "syn 1.0.105", 1511 | "wasm-bindgen-backend", 1512 | "wasm-bindgen-shared", 1513 | ] 1514 | 1515 | [[package]] 1516 | name = "wasm-bindgen-shared" 1517 | version = "0.2.79" 1518 | source = "registry+https://github.com/rust-lang/crates.io-index" 1519 | checksum = "3d958d035c4438e28c70e4321a2911302f10135ce78a9c7834c0cab4123d06a2" 1520 | 1521 | [[package]] 1522 | name = "web-sys" 1523 | version = "0.3.56" 1524 | source = "registry+https://github.com/rust-lang/crates.io-index" 1525 | checksum = "c060b319f29dd25724f09a2ba1418f142f539b2be99fbf4d2d5a8f7330afb8eb" 1526 | dependencies = [ 1527 | "js-sys", 1528 | "wasm-bindgen", 1529 | ] 1530 | 1531 | [[package]] 1532 | name = "winapi" 1533 | version = "0.3.9" 1534 | source = "registry+https://github.com/rust-lang/crates.io-index" 1535 | checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" 1536 | dependencies = [ 1537 | "winapi-i686-pc-windows-gnu", 1538 | "winapi-x86_64-pc-windows-gnu", 1539 | ] 1540 | 1541 | [[package]] 1542 | name = "winapi-i686-pc-windows-gnu" 1543 | version = "0.4.0" 1544 | source = "registry+https://github.com/rust-lang/crates.io-index" 1545 | checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" 1546 | 1547 | [[package]] 1548 | name = "winapi-x86_64-pc-windows-gnu" 1549 | version = "0.4.0" 1550 | source = "registry+https://github.com/rust-lang/crates.io-index" 1551 | checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" 1552 | 1553 | [[package]] 1554 | name = "windows-sys" 1555 | version = "0.42.0" 1556 | source = "registry+https://github.com/rust-lang/crates.io-index" 1557 | checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" 1558 | dependencies = [ 1559 | "windows_aarch64_gnullvm", 1560 | "windows_aarch64_msvc", 1561 | "windows_i686_gnu", 1562 | "windows_i686_msvc", 1563 | "windows_x86_64_gnu", 1564 | "windows_x86_64_gnullvm", 1565 | "windows_x86_64_msvc", 1566 | ] 1567 | 1568 | [[package]] 1569 | name = "windows_aarch64_gnullvm" 1570 | version = "0.42.0" 1571 | source = "registry+https://github.com/rust-lang/crates.io-index" 1572 | checksum = "41d2aa71f6f0cbe00ae5167d90ef3cfe66527d6f613ca78ac8024c3ccab9a19e" 1573 | 1574 | [[package]] 1575 | name = "windows_aarch64_msvc" 1576 | version = "0.42.0" 1577 | source = "registry+https://github.com/rust-lang/crates.io-index" 1578 | checksum = "dd0f252f5a35cac83d6311b2e795981f5ee6e67eb1f9a7f64eb4500fbc4dcdb4" 1579 | 1580 | [[package]] 1581 | name = "windows_i686_gnu" 1582 | version = "0.42.0" 1583 | source = "registry+https://github.com/rust-lang/crates.io-index" 1584 | checksum = "fbeae19f6716841636c28d695375df17562ca208b2b7d0dc47635a50ae6c5de7" 1585 | 1586 | [[package]] 1587 | name = "windows_i686_msvc" 1588 | version = "0.42.0" 1589 | source = "registry+https://github.com/rust-lang/crates.io-index" 1590 | checksum = "84c12f65daa39dd2babe6e442988fc329d6243fdce47d7d2d155b8d874862246" 1591 | 1592 | [[package]] 1593 | name = "windows_x86_64_gnu" 1594 | version = "0.42.0" 1595 | source = "registry+https://github.com/rust-lang/crates.io-index" 1596 | checksum = "bf7b1b21b5362cbc318f686150e5bcea75ecedc74dd157d874d754a2ca44b0ed" 1597 | 1598 | [[package]] 1599 | name = "windows_x86_64_gnullvm" 1600 | version = "0.42.0" 1601 | source = "registry+https://github.com/rust-lang/crates.io-index" 1602 | checksum = "09d525d2ba30eeb3297665bd434a54297e4170c7f1a44cad4ef58095b4cd2028" 1603 | 1604 | [[package]] 1605 | name = "windows_x86_64_msvc" 1606 | version = "0.42.0" 1607 | source = "registry+https://github.com/rust-lang/crates.io-index" 1608 | checksum = "f40009d85759725a34da6d89a94e63d7bdc50a862acf0dbc7c8e488f1edcb6f5" 1609 | 1610 | [[package]] 1611 | name = "winreg" 1612 | version = "0.10.1" 1613 | source = "registry+https://github.com/rust-lang/crates.io-index" 1614 | checksum = "80d0f4e272c85def139476380b12f9ac60926689dd2e01d4923222f40580869d" 1615 | dependencies = [ 1616 | "winapi", 1617 | ] 1618 | --------------------------------------------------------------------------------