deps: Feature gate portmapper, and allow disabling portmapper by default.#4011
deps: Feature gate portmapper, and allow disabling portmapper by default.#4011
Conversation
Portmapper is already disabled in wasm, so this isn't very intrusive.
|
Documentation for this PR has been generated and is available at: https://n0-computer.github.io/iroh/pr/4011/docs/iroh/ Last updated: 2026-03-12T10:16:22Z |
c765c3f to
e2e030c
Compare
53925bf to
67625da
Compare
646cf89 to
f41284f
Compare
f41284f to
b7e16c2
Compare
…t get 0s 0 instead of breakage. Also make it possible to dynamically disable the portmapper.
|
Added the ability to configure and disable the portmapper in the builder: .portmapper_config(PortmapperConfig::Disabled). PortmapperConfig is basically a bool newtype at this time, but the enabled case is open, so we could add config later. We could be cute and change portmapper_config to take .portmapper(false) // no need to import PortmapperConfigWe might also return an error if the portmapper is disabled via the feature flag, but not sure about that. I guess it might make sense if we later want to add config options, then we could reuse that error if the options don't make sense. |
…ault features This is to protect us from accidentally bringing back the dep.
Description
Iroh on esp32 is over 4 MiB out of the box, which means that it won't run on the majority of the esp32 devices out there.
There are a number of deps we can get rid of without affecting core functionality. Portmapper is the easiest to feature gate since it is already disabled for wasm. Portmapper and its dep idg-next are big enough that when disabling it it barely fits on esp32 4 MiB devices.
Implements #3811
Breaking Changes
Builds that use no-default-features won't have the portmapper. This does not change APIs, but will change functionality.
Notes & open questions
In general, if a feature is disabled, should we stub the public API to just report 0/noops, or hide it? E.g. if you were to stub portmapper metrics you would not need to enable portmapper for our bench project.
Change checklist
quic-rpciroh-gossipiroh-blobsdumbpipesendme