Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/inducer/starlark-pyo3
A Python wrapper for starlark-rust
https://github.com/inducer/starlark-pyo3
bindings python python3 rust starlark
Last synced: about 2 months ago
JSON representation
A Python wrapper for starlark-rust
- Host: GitHub
- URL: https://github.com/inducer/starlark-pyo3
- Owner: inducer
- License: other
- Created: 2021-12-06T06:52:19.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-05-22T20:18:03.000Z (8 months ago)
- Last Synced: 2024-10-29T16:41:55.304Z (2 months ago)
- Topics: bindings, python, python3, rust, starlark
- Language: Rust
- Homepage:
- Size: 86.9 KB
- Stars: 11
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
- awesome-starlark - starlark-pyo3 - Python bindings for Starlark in Rust. (Getting Started)
- awesome-starlark - starlark-pyo3
README
Starlark-PyO3: Python bindings for starlark-rust
================================================.. image:: https://github.com/inducer/starlark-pyo3/workflows/CI/badge.svg?branch=main&event=push
:alt: Github Build Status
:target: https://github.com/inducer/starlark-pyo3/actions?query=branch%3Amain+workflow%3ACI+event%3Apush
.. image:: https://badge.fury.io/py/starlark-pyo3.png
:alt: Python Package Index Release Page
:target: https://pypi.org/project/starlark-pyo3/This package provides a sandboxed/restricted Python-like environment
by exposing the
`starlark-rust `__
interpreter for the
`Starlark `__
Python-like language to Python via `PyO3 `__.`Starlark `__ claims the following
*design principles*:- **Deterministic evaluation**. Executing the same code twice will give the
same results.
- **Hermetic execution**. Execution cannot access the file system, network,
system clock. It is safe to execute untrusted code.
- **Parallel evaluation**. Modules can be loaded in parallel. To guarantee a
thread-safe execution, shared data becomes immutable.
- **Simplicity**. We try to limit the number of concepts needed to understand
the code. Users should be able to quickly read and write code, even if they
are not expert. The language should avoid pitfalls as much as possible.
- **Focus on tooling**. We recognize that the source code will be read,
analyzed, modified, by both humans and tools.
- **Python-like**. Python is a widely used language. Keeping the language
similar to Python can reduce the learning curve and make the semantics more
obvious to users.*Status:* This is reasonably complete and usable.
Links
------ `Documentation `__
- `Github `__ (issues etc.)
- `Package index `__Installation
------------
To install, say::pip install starlark-pyo3
Binary wheels are available for all major platforms. The module is importable
as ``starlark``.Installation for Development
----------------------------To use this, make sure you have nightly rust available::
curl –proto ‘=https’ –tlsv1.2 -sSf https://sh.rustup.rs \| sh rustup
default nightlyThen, to install into the current Python virtual environment::
pip install maturin
maturin develop