Skip to content
Navigation Menu
Sign in
Products
Platform
GitHub
Repository hosting, code review, and collaboration
Copilot
AI coding agent for tasks, projects, and automated work
Build & Ship
Actions
CI/CD and automation
Code Quality
Quality analysis, fixes, and enforcement
Codespaces
Cloud development environments
Secure
Code Security
Vulnerability detection and remediation
Secret Protection
Secret scanning and leak prevention
All Features
Developers
Learn
Documentation
Training
Certifications
Build
Build with Copilot
Customize Copilot
Integrations
Explore
Trending repos
GitHub Sponsors
Developer articles
Changelog
Changelog
Your source for the latest features, improvements, and fixes across GitHub products, all in one place.
Businesses
By Stage
Enterprises
Team
Startups
Nonprofits
By Industry
Healthcare
Financial services
Manufacturing
Government
See all industries
Evaluate GitHub
Why GitHub
Customer Stories
Business insights
Trust Center
Add-ons
GitHub Advanced Security
Enterprise-grade code security
Copilot for business
Enterprise-grade AI features
Premium Support
Enterprise-grade 24/7 support
Resources
Learn & Connect
Documentation
Resource center
Blog
Events & webinars
Community Forum
Customer Stories
Integrations
Support
Customer support
Training
GitHub Status
Company
About
Partners
Changelog
GitHub Universe
GitHub Universe
The event for developers, by developers — talks, workshops, and what’s next for GitHub.
Pricing
Search
/
Sign in
Sign up
Appearance settings
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
TrainLCD
StationAPI
Repository navigation
Code
Issues
4
(4)
Pull requests
1
(1)
Actions
Security and quality
Insights
More
items
Files
Expand file tree
dev
Breadcrumbs
StationAPI
/
Cargo.toml
Copy path
Blame
More file actions
Blame
More file actions
Latest commit
History
History
History
51 lines (45 loc) · 1.82 KB
dev
Breadcrumbs
StationAPI
/
Cargo.toml
Copy path
Top
File metadata and controls
Code
Blame
51 lines (45 loc) · 1.82 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# StationAPI 本体。Cloudflare Workers 上で GraphQL を配信する wasm32 専用 crate。
#
# ネイティブ側の crate は workspace メンバーとして同居する:
# stationapi ... ドメインとユースケース (この crate と preprocessor が共有)
# preprocessor ... generated/*.csv を data/*.csv と GTFS から組み立てる
# data_validator ... data/*.csv の整合性検査
#
# この crate も wasm-bindgen 経由でネイティブターゲットのビルドは通るが、
# 実行できるのは Workers 上だけ。`cargo check` などは対象を明示すること。
[package]
name = "stationapi-worker"
version = "0.1.0"
edition = "2021"
[lib]
crate-type = ["cdylib"]
[workspace]
resolver = "2"
members = ["stationapi", "preprocessor", "data_validator"]
[dependencies]
stationapi = { path = "stationapi" }
worker = "0.8"
async-trait = "0.1"
async-graphql = { version = "7", default-features = false, features = ["graphiql"] }
serde_json = "1"
csv = "1.3"
console_error_panic_hook = "0.1"
[build-dependencies]
csv = "1.3"
# 本番成果物である wasm 向けの設定。
#
# サイズは Workers の 10MiB 制限に対して gzip 3.5MiB (34%) と余裕があるので、
# opt-level はサイズ優先 ("s") にせず速度優先のままにする ("s" にしても
# gzip で 173KiB しか縮まらない)。
# lto は gzip -193KiB / raw -1.35MB 効く。raw サイズは isolate がモジュールを
# 読み込む時間に効くので有効にしておく。
[profile.release]
opt-level = 3
lto = true
codegen-units = 1
# preprocessor は generated/*.csv を作るためだけのツール。実行は 7 秒ほどなのに
# LTO を掛けるとビルドが 1 分半から 2 分半へ伸びて割に合わないため、こちらを使う。
[profile.tool]
inherits = "release"
lto = false
codegen-units = 16
You can’t perform that action at this time.