| Comment: | docs: libfossil_nohttp is for library embedders, who supply their own transport
The cli package and examples/tinygo, which calls NewHTTPTransport, do not build with the tag; a tagged embedder supplies its own Transport and serves through HandleSyncWithOpts. |
|---|---|
| Timelines: | family | ancestors | descendants | both | main | trunk |
| Files: | files | file ages | folders |
| SHA3-256: |
4069607141b9c606565ccc7465d4961c |
| User & Date: | [email protected] on 2026-10-29 03:21:22.000 |
| Other Links: | branch diff | manifest | tags |
|
2026-10-29
| ||
| 03:30 |
Merge pull request #526 from danmestas/perf/wasm-size-and-refusal
Return receive-budget refusals as *RefusedError; libfossil_nohttp tag cuts the TinyGo engine ~97 KB check-in: 0ffed7ff5f user: [email protected] tags: main, trunk | |
| 03:21 |
docs: libfossil_nohttp is for library embedders, who supply their own transport
The cli package and examples/tinygo, which calls NewHTTPTransport, do not build with the tag; a tagged embedder supplies its own Transport and serves through HandleSyncWithOpts. check-in: 4069607141 user: [email protected] tags: main, trunk | |
| 03:06 |
perf(wasm): add a libfossil_nohttp build tag that leaves out net/http
Under TinyGo, importing net/http at all links its TLS and X.509 code (crypto/x509, encoding/asn1, math/big's integers, AES-GCM, SHA-3, netip) whether or not a request is ever made: a five-line program that calls only http.StatusText grows by about 430 KB raw. The library imports it for its HTTP client transport and its HTTP server, which a program that serves sync through HandleSyncWithOpts and supplies its own transport never calls. Built with -tags libfossil_nohttp, the library leaves out NewHTTPTransport, WithHTTPClient, Repo.Pull, Repo.XferHandler and Repo.ServeHTTP, and the internal/sync client, server, redirect handling and peer-address trace they use. HandleSync, HandleSyncWithOpts, Sync over a host Transport and everything else are unchanged. Without the tag nothing changes. The retry classifier keeps the two statuses it read from net/http as constants, and DNS fault classification moves to its own file so it stays in the tagged build. For the html-artifact-publisher engine (TinyGo 0.43.0, Go 1.26.0) the tag takes the gzipped binary from 1,100,251 to 1,003,279 bytes. A test builds the library, db and simio with the tag for the host and js/wasm and checks none links net/http, net/http/httptrace or crypto/tls, and that the untagged library still does. check-in: 9594cf3bae user: [email protected] tags: main, trunk | |