Comments (7)
Oh sorry, I misunderstood the original issue then. In any case a postprocess
function makes sense to reduce the size of the final binary.
Your proposed cache_preprocess
function also makes sense. I have to think a bit about the naming, that function would basically transform the buffer to some other buffer immediately after downloading it.
I'm not quite happy with that additional complexity and in general with having to store the binaries in-tree as you do in cargo-spellcheck
now but I don't think there's a better solution..
from nlprule.
Actually you don't have to store the binaries in-tree if you just run the build.rs
once before cargo publish
, right? In that case only the additional complexity is an issue and that's not too bad in the nlprule-build
crate.
from nlprule.
I don't think this works. Cargo requires all sources to be part of the git tree and a commit to be able to publish, and that's part of the "deploy when github is down" user story. So while postprocess is nice, I would not want to decompress the files on each run (at least for cargo-spellcheck
which is a short lived task, that doesn't seem reasonable).
from nlprule.
I'd be happy to create PR for this!
from nlprule.
That would be great, sure! I think the best solution is a transform
function which transforms the binary immediately after downloading / building. It has to be transformed consistently regardless of whether it is built from the build directory or downloaded.
My comment above was perhaps a bit confusing because I conflated the two things (this issue and storing the binaries in-tree), what I meant was that you can just
cargo build # <- creates the nlprule-data directory in your case
cargo publish --allow-dirty
if you didn't want to store the binaries in Git.
from nlprule.
That would be great, sure! I think the best solution is a
transform
function which transforms the binary immediately after downloading / building. It has to be transformed consistently regardless of whether it is built from the build directory or downloaded.
Good point, noted.
My comment above was perhaps a bit confusing because I conflated the two things (this issue and storing the binaries in-tree), what I meant was that you can just
cargo build # <- creates the nlprule-data directory in your case cargo publish --allow-dirty
That would work, but it includes the risk of publishing a local state of uncommitted changes which I am not keen on. It seems to be a solution, but not a pretty one.
if you didn't want to store the binaries in Git.
I do :) the user story dependencies should not differ between crates-io and a git based installation (one can also install directly from git with cargo
).
from nlprule.
one can also install directly from git with cargo
Oh, that's a good point then. I just thought it's not ideal because it might blow up the size of the repository a bit. So it is enough for me if it is not necessary to store the binaries in-tree when making something that depends on nlprule.
from nlprule.
Related Issues (20)
- Modularizing the crate HOT 4
- Make rayon optional
- Token as returned by pipe() is relative to the sentence boundaries HOT 6
- Improve loading speed (of regex?) - cli usecase HOT 13
- Usability of the rules API degraded from 0.4.6 to 0.5.1 HOT 1
- oob access since 0.5.3 HOT 6
- Support for older glibc HOT 8
- Grammar check fails HOT 3
- panic in `Regex::regex()` HOT 5
- Compile error in build.rs from README.md HOT 3
- Support Rules written in Rust HOT 1
- Coalesced words - tokenization HOT 1
- Readme link to languagetool HOT 1
- Support for AnnotatedText HOT 10
- Clarify license statement HOT 5
- Document how to load custom rulesets HOT 4
- Support distinguishing between grammar and style errors HOT 3
- Be more responsible about network requests HOT 2
- Single Or Pural
- Support python 3.11
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nlprule.