text-extract/Cargo.toml
flemming-it 1078367d6a
All checks were successful
CI / Linux x86_64 (Forgejo) (push) Successful in 3m7s
ci: switch SDK to git dep, inject MODULE_SDK_PAT via insteadOf
Two prior approaches failed:

1. Sibling-clone of module-sdk into a directory two levels up
   from $GITHUB_WORKSPACE failed with a 2-second runner failure
   (bisect confirmed: workflow with ONLY the own-repo checkout
   succeeded; adding the sibling-clone step reproduced the
   failure).

2. Anonymous clone of the now-public module-sdk also failed —
   the Forgejo instance has REQUIRE_SIGNIN_VIEW=true, so making
   a repo public does not enable anonymous read.

The working approach: switch fai-module-sdk to a git dependency
in Cargo.toml and inject a stored Forgejo PAT into any outgoing
git.flemming.ws URL via 'git config url.X.insteadOf Y'. Cargo's
git fetch (driven by CARGO_NET_GIT_FETCH_WITH_CLI=true) then
authenticates transparently.

The Forgejo Actions secret MODULE_SDK_PAT carries the read token.
Locally, the same insteadOf trick works via GIT_CONFIG_COUNT
without polluting the global git config.

Bumps text-extract 0.1.4 -> 0.1.5.

Signed-off-by: flemming-it <sf@flemming.it>
2026-05-02 07:33:32 +02:00

51 lines
1.3 KiB
TOML

# Standalone Cargo.toml — targets wasm32-wasip2.
#
# Build with:
# cargo build --release --target wasm32-wasip2
[package]
name = "text_extract"
version = "0.1.5"
edition = "2024"
authors = ["Dr. Stefan Flemming <platform@flemming.ai>"]
license = "Apache-2.0"
publish = false
description = "F∆I module — extract plain text from PDF and DOCX documents"
repository = "https://git.flemming.ws/fai-modules/text-extract"
rust-version = "1.85"
[lib]
crate-type = ["cdylib", "rlib"]
[dependencies]
fai-module-sdk = { git = "https://git.flemming.ws/fai/module-sdk.git", branch = "main" }
serde = { version = "1", features = ["derive"] }
pdf-extract = "0.7"
zip = { version = "2", default-features = false, features = ["deflate"] }
quick-xml = "0.36"
[dev-dependencies]
serde_json = "1"
# Restricted features: deflate64 (a default feature of zip 2.x)
# requires the unstable `unbounded_shifts` library feature.
# We only need DEFLATE for round-tripping a minimal DOCX in tests.
zip = { version = "2", default-features = false, features = ["deflate"] }
[profile.release]
opt-level = "s"
lto = true
codegen-units = 1
strip = "symbols"
[lints.rust]
unsafe_op_in_unsafe_fn = "warn"
[lints.clippy]
unwrap_used = "deny"
expect_used = "deny"
panic = "deny"
print_stdout = "deny"
print_stderr = "deny"
[workspace]
# Empty workspace table so this package is NOT picked up by a parent.