-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathCargo.toml
More file actions
46 lines (41 loc) · 1.39 KB
/
Copy pathCargo.toml
File metadata and controls
46 lines (41 loc) · 1.39 KB
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
cargo-features = ["profile-rustflags"]
#cargo-features = ["panic-immediate-abort", "profile-rustflags"]
[package]
name = "ort-openrouter-cli"
version = "0.6.5"
edition = "2024"
description = "Open Router CLI"
authors = ["Graham King <[email protected]>"]
license = "MIT"
repository = "https://github.com/grahamking/ort"
readme = "README.md"
[features]
# Will print to stderr "+530\n" and "-530\n" when memory is allocated and freed
# --release mode only because in debug mode we use Rust's allocator
print-allocations = []
# Panic the first time we call realloc, which tries to resize a block of memory.
# Ideally all memory is correctly sized on first alloc.
panic-on-realloc = []
# Name it 'ort' not 'ort-openrouter-cli' which is the crates.io name
[[bin]]
name = "ort"
path = "src/main.rs"
[profile.release]
opt-level = "s"
strip = true
codegen-units = 1
# immediate-abort saves binary size which is very nice, but:
# 1. makes building / installing more difficult, needs rust-src
# 2. make debugging harder, no panic info at all
# 3. does not work without libc AFAICT
#panic = "immediate-abort"
panic = "abort"
lto = true # does not build without this, "undefined symbol: _Unwind_Resume"
rustflags = [
"-Ctarget-cpu=native",
"-Clink-args=-nostartfiles",
"-Crelocation-model=static",
"-Clink-args=-Wl,--no-dynamic-linker,--build-id=none,--no-eh-frame-hdr",
"-Cforce-frame-pointers=yes",
"-Clink-arg=-fuse-ld=lld",
]