Skip to content

Commit 56ab69e

Browse files
authored
remove rust bindings for now (#812)
Remove the rust bindings for now since they make development and releasing more complicated.
1 parent 5ad2304 commit 56ab69e

File tree

3 files changed

+0
-14
lines changed

3 files changed

+0
-14
lines changed

guidance/models/_model.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,7 @@
3636
"Failed to load guidance.cpp, falling back to Python mirror implementations..."
3737
)
3838
from .. import _cpp as cpp
39-
4039
from ._guidance_engine_metrics import GuidanceEngineMetrics
41-
from .._rust.guidancerust import engine_start
4240
from .._utils import softmax, CaptureEvents
4341
from .._parser import EarleyCommitParser, Parser
4442
from .._grammar import (
@@ -741,9 +739,6 @@ def __call__(self, parser, grammar, ensure_bos_token=True):
741739

742740
self.start(parser, grammar, ensure_bos_token)
743741

744-
# TODO: remove this after the next release. This verifies that calling Rust works.
745-
assert("def" == engine_start("abc", "def", 1))
746-
747742
logits = None
748743
while True:
749744
is_done, logits_state, response_state = self.next(logits)

pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ requires = [
33
"setuptools>=42",
44
"wheel",
55
"pybind11>=2.10.0",
6-
"setuptools-rust",
76
]
87
build-backend = "setuptools.build_meta"
98

setup.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
import codecs
1818
from setuptools import setup, find_packages
1919
from pybind11.setup_helpers import Pybind11Extension, build_ext
20-
from setuptools_rust import Binding, RustExtension
2120

2221
here = os.path.abspath(os.path.dirname(__file__))
2322

@@ -91,13 +90,6 @@ def find_version(*file_paths):
9190
"guidance.cpp", ["guidance/_cpp/main.cpp", "guidance/_cpp/byte_trie.cpp"]
9291
)
9392
],
94-
rust_extensions=[
95-
RustExtension(
96-
"guidance._rust.guidancerust",
97-
"guidance/_rust/Cargo.toml",
98-
binding=Binding.PyO3,
99-
)
100-
],
10193
cmdclass={"build_ext": build_ext},
10294
python_requires=">=3.8",
10395
install_requires=install_requires,

0 commit comments

Comments
 (0)