Skip to main content

pylon_core/
lib.rs

1//
2// This source file is part of the Pylon open source project.
3//
4// Copyright (c) 2026 Jaldis B.V.
5//
6// Licensed under the MIT OR Apache-2.0 license (the "License");
7// you may not use this file except in compliance with the License.
8// You may obtain a copy of the License at
9//
10//     https://opensource.org/licenses/MIT
11//     https://www.apache.org/licenses/LICENSE-2.0
12//
13// Unless required by applicable law or agreed to in writing, software
14// distributed under the License is distributed on an "AS IS" BASIS,
15// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16// See the License for the specific language governing permissions and
17// limitations under the License.
18//
19
20pub mod analyze;
21pub mod cast;
22pub mod diff;
23pub mod error;
24pub mod export;
25pub mod introspect;
26pub mod ir;
27pub mod migrate;
28pub mod migration;
29pub mod parse;
30pub mod query;
31pub mod schema;
32pub mod shape_id;
33pub mod sql;
34pub mod stdlib;
35pub mod validate;
36
37#[cfg(test)]
38mod sync_assertions {
39    fn assert_sync<T: Sync + Send>() {}
40
41    /// The types `pylon-py` wants to hold across a `py.detach()` — if any of
42    /// these stopped being `Send + Sync`, the GIL-releasing wrappers there
43    /// would stop compiling, and this says why.
44    #[test]
45    fn types_crossed_by_gil_releasing_calls_are_send_and_sync() {
46        assert_sync::<crate::schema::SchemaDescriptor>();
47        assert_sync::<crate::query::CompiledQuery>();
48        assert_sync::<crate::ir::SessionConfig>();
49    }
50}