Skip to main content

A Python wrapper around Rust HelloWorld

Project description

Building Rust with Python Bindings

Prerequisites

  • Rust and Cargo installed
  • Python with pip installed

Build Process

1. Build Rust Project

cargo build

2. Build Python Binding

Option A: Build and Install Wheel

  1. Build the wheel package:
pip install setuptools-rust wheel build
python -m build
  1. Install the generated wheel:
pip install <path-to-wheel>

Option B: Development Mode

For development purposes, you can install the package in editable mode:

pip install -e .

Note: When modifying Rust code, you must rebuild the wheel for changes to take effect.

CI/CD Setup

The continuous integration pipeline consists of three main steps:

1. Build Wheels

  • Uses cibuildwheel to create manylinux x86_64 packages
  • Compatible with major Linux distributions (Ubuntu, CentOS, etc.)
  • Additional configurations can be added to support other OS/architectures
  • Reference: cibuildwheel documentation

2. Build Source Distribution

  • Creates a source distribution containing the raw, unbuilt code
  • Enables pip to build the package from source when prebuilt wheels are unavailable

3. Publish to PyPI

  • Uploads both wheels and source distribution to PyPI

The CI configuration is based on the tiktoken workflow.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sglang_rust_test-0.1.12.tar.gz (8.5 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

sglang_rust_test-0.1.12-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (6.7 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

sglang_rust_test-0.1.12-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (6.7 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

sglang_rust_test-0.1.12-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (6.7 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

sglang_rust_test-0.1.12-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (6.7 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

sglang_rust_test-0.1.12-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (6.7 MB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ x86-64

File details

Details for the file sglang_rust_test-0.1.12.tar.gz.

File metadata

  • Download URL: sglang_rust_test-0.1.12.tar.gz
  • Upload date:
  • Size: 8.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.12

File hashes

Hashes for sglang_rust_test-0.1.12.tar.gz
Algorithm Hash digest
SHA256 6a2310e636758ba939ac0abbd805084106bc589e69297c1737be96a63906a3e3
MD5 99abe9a6879e3b0980e2dbcdbf51c848
BLAKE2b-256 2bb963ae0d7bebcb3172bd69d6cc1a33e8aaa1259d284b6a3ae05ac22f92098e

See more details on using hashes here.

File details

Details for the file sglang_rust_test-0.1.12-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for sglang_rust_test-0.1.12-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 eefba0511cece85dad7e678fb3c2d4b872838ee33774941ff1080df6dd73727c
MD5 5b1c7156a8553555fce91ea052581e19
BLAKE2b-256 44765a96582d1525b619f474dcb481e33c9ab6a57d412f33584426edf672c4a3

See more details on using hashes here.

File details

Details for the file sglang_rust_test-0.1.12-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for sglang_rust_test-0.1.12-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 f37f9aaded39bb42470ea1c7a119a42064783714983e86f00c3744259fcc61af
MD5 f1e2401fda9d9e383799379685a85ad6
BLAKE2b-256 63c3887ec5e527d90f746364da5beb957ff796430b4fb1db61a98b3261cbd0ad

See more details on using hashes here.

File details

Details for the file sglang_rust_test-0.1.12-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for sglang_rust_test-0.1.12-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 999409e663c221a9256a7081a13d9b0c756edacf9eb06e09a19ba6b71ed868f6
MD5 05fd6b6420668185ab5e33a75c8ef6f7
BLAKE2b-256 2b7ef6821f399bfa3678534cbf1face463a004d0e3acfe7732994754c5dbffb6

See more details on using hashes here.

File details

Details for the file sglang_rust_test-0.1.12-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for sglang_rust_test-0.1.12-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 60c358c7323656f1ade37d74bf98894b242e07061531628e55d52c22a65ff9c2
MD5 5f556747659db99a9e1d073b3439de06
BLAKE2b-256 242aa9e9d16b13db56ea5723ab875b3479d0ac40d3ec55552e24128de69a6a06

See more details on using hashes here.

File details

Details for the file sglang_rust_test-0.1.12-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for sglang_rust_test-0.1.12-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e9cc532fec919c632968997eb9da18072c03a98a0726a8211be9c0461b0583c7
MD5 cd89db8a48fd2536e4dd4c179feb2513
BLAKE2b-256 8532ede80324f1a7e588d336c0e48b39e0e59808c895f8ee8a4fa8a18b92251d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page