mirror of
https://github.com/google/bumble.git
synced 2026-04-17 00:35:31 +00:00
Following up on the [loose end from the initial PR](https://github.com/google/bumble/pull/207#discussion_r1278015116), we can avoid accessing the Python company id map at runtime by doing code gen ahead of time. Using an example to do the code gen avoids even the small build slowdown from invoking the code gen logic in build.rs, but more importantly, means that it's still a totally boring normal build that won't require any IDE setup, etc, to work for everyone. Since the company ID list changes rarely, and there's a test to ensure it always matches, this seems like a good trade.
22 lines
735 B
Rust
22 lines
735 B
Rust
// Copyright 2023 Google LLC
|
|
//
|
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
// you may not use this file except in compliance with the License.
|
|
// You may obtain a copy of the License at
|
|
//
|
|
// http://www.apache.org/licenses/LICENSE-2.0
|
|
//
|
|
// Unless required by applicable law or agreed to in writing, software
|
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
// See the License for the specific language governing permissions and
|
|
// limitations under the License.
|
|
|
|
#[pyo3_asyncio::tokio::main]
|
|
async fn main() -> pyo3::PyResult<()> {
|
|
pyo3_asyncio::testing::main().await
|
|
}
|
|
|
|
mod assigned_numbers;
|
|
mod wrapper;
|