Add boilerplate

This commit is contained in:
Simon Hausmann 2022-12-13 20:18:46 +01:00 committed by Simon Hausmann
parent adcfa9b9ca
commit a2054e7ebd
4 changed files with 43 additions and 1 deletions

2
.gitignore vendored
View file

@ -15,3 +15,5 @@ docs/reference/src/language/builtins/structs.md
*.node
*.d.ts
.env

View file

@ -8,6 +8,7 @@ members = [
'api/rs/build',
'api/rs/macros',
'api/rs/slint',
'api/python',
'api/wasm-interpreter',
'docs/tutorial/rust/src',
'examples/7guis',

30
api/python/Cargo.toml Normal file
View file

@ -0,0 +1,30 @@
# Copyright © SixtyFPS GmbH <info@slint.dev>
# SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-Royalty-free-1.1 OR LicenseRef-Slint-commercial
[package]
name = "pyslint"
version.workspace = true
authors.workspace = true
edition.workspace = true
license.workspace = true
description = "Slint Python integration"
repository.workspace = true
homepage.workspace = true
publish = false
rust-version.workspace = true
[lib]
name = "slint"
path = "lib.rs"
crate-type = ["cdylib"]
[dependencies]
i-slint-backend-selector = { version = "=1.4.0", path="../../internal/backends/selector" }
i-slint-backend-testing = { version = "=1.4.0", path="../../internal/backends/testing", optional = true }
i-slint-renderer-skia = { version = "=1.4.0", path="../../internal/renderers/skia", optional = true, features = ["x11", "wayland"] }
i-slint-core = { version = "=1.4.0", path="../../internal/core", features = ["ffi"] }
slint-interpreter = { workspace = true, features = ["default", "display-diagnostics", "internal"] }
pyo3 = { version = "0.20.0", features = ["extension-module", "indexmap"] }
[build-dependencies]
i-slint-common = { version = "=1.4.0", path="../../internal/common" }

9
api/python/lib.rs Normal file
View file

@ -0,0 +1,9 @@
// Copyright © SixtyFPS GmbH <info@slint.dev>
// SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-Royalty-free-1.1 OR LicenseRef-Slint-commercial
use pyo3::prelude::*;
#[pymodule]
fn slint(_py: Python<'_>, m: &PyModule) -> PyResult<()> {
Ok(())
}