burntsushi / utf8-ranges Goto Github PK
View Code? Open in Web Editor NEWConvert contiguous ranges of Unicode codepoints to UTF-8 byte ranges.
License: The Unlicense
Convert contiguous ranges of Unicode codepoints to UTF-8 byte ranges.
License: The Unlicense
Great package, but how does one convert discontiguous ranges to a series of byte ranges? For example, [а-мо-я]
? It's not unusual for regular expressions to have ranges with holes in them.
If you convert [а-м]
and [о-я]
separately, the corresponding byte ranges would intersect: [{208 208} {176 188}]
and [{208 208} {190 191}]
.
This is probably an issue with rustc, but this is the only project I was able to reliably reproduce it with:
➜ utf8-ranges git:(master) cargo build --target wasm32-unknown-unknown --verbose
Compiling utf8-ranges v1.0.0 (file:///home/udoprog/repo/utf8-ranges)
Running `rustc --crate-name utf8_ranges src/lib.rs --crate-type lib --emit=dep-info,link -C debuginfo=2 -C metadata=90af49223e8dd833 -C extra-filename=-90af49223e8dd833 --out-dir /home/udoprog/repo/utf8-ranges/target/wasm32-unknown-unknown/debug/deps --target wasm32-unknown-unknown -C incremental=/home/udoprog/repo/utf8-ranges/target/wasm32-unknown-unknown/debug/incremental -L dependency=/home/udoprog/repo/utf8-ranges/target/wasm32-unknown-unknown/debug/deps -L dependency=/home/udoprog/repo/utf8-ranges/target/debug/deps`
LLVM ERROR: out of memory
error: Could not compile `utf8-ranges`.
Caused by:
process didn't exit successfully: `rustc --crate-name utf8_ranges src/lib.rs --crate-type lib --emit=dep-info,link -C debuginfo=2 -C metadata=90af49223e8dd833 -C extra-filename=-90af49223e8dd833 --out-dir /home/udoprog/repo/utf8-ranges/target/wasm32-unknown-unknown/debug/deps --target wasm32-unknown-unknown -C incremental=/home/udoprog/repo/utf8-ranges/target/wasm32-unknown-unknown/debug/incremental -L dependency=/home/udoprog/repo/utf8-ranges/target/wasm32-unknown-unknown/debug/deps -L dependency=/home/udoprog/repo/utf8-ranges/target/debug/deps` (signal: 6, SIGABRT: process abort signal)
I see this crate is deprecated but since deprecating it you've published at least one version of fst
which depends on it, and the latest commit in the fst
repo still depends on this crate. So I guess I'm a bit confused by the deprecated status, but I'd also understand if you just close this as a non-issue 🤷
This code in the test suite is unconditional UB because it attempts to construct an invalid char
. Miri immediately flags this (which is how I ran into this).
Lines 463 to 464 in 8d38a93
This crate is rather niche and doesn't enjoy wide use, so there's been little iteration on its API. With that said, its API is very small and there's no good reason to expect usage to increase within the near term, so I think we should cut a 1.0 release within the next few weeks.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.