A naive implementation would be small, but a correct implementation (with some concrete definition of "correct") will need a sizable data table. I know this because I wrote that part of code [1] and somehow it is still in the std even though other algorithms now exist [2].
[1] https://github.com/rust-lang/rust/pull/24612
[2] https://github.com/rust-lang/rust/issues/52811