tempfile
tectonic
tempfile | tectonic | |
---|---|---|
8 | 22 | |
1,074 | 3,760 | |
- | 1.3% | |
6.9 | 9.1 | |
16 days ago | 4 days ago | |
Rust | C | |
Apache License 2.0 | GNU General Public License v3.0 or later |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
tempfile
-
Hey Rustaceans! Got a question? Ask here (27/2023)!
I need to do some tests with files operations, what's the best practice in regards to creating temporary files in tests ? I heard about tempfile but is there a more idiomatic way to do that ?
-
Testing the memory safe Rust implementation of Sudo/Su
The sudo-rs Cargo.toml [1] file seems very reasonable. This is the curse of being cross platform. The inclusion of https://github.com/Stebalien/tempfile as a dependency is responsible for the overwhelming majority of lines due to including *-sys crates for multiple OSs.
~/Code/tempfile !! tokei vendor
-
Adding automated tests to rost_gen
Eventually, I had to test reading of input file and generation of the html file. To do this, I would need to create test files for input and output for this scenario. However, this could cause problems unless I named all the test files differently as tests usually run in parallel. So, I decided to use the tempfile crate to create a temporary test directory for each test (where needed):
-
Is this safe? Keeping and opening temporary file.
Create a NamedTempFile with the tempfile crate.
-
How can I test this get_type_filepaths function?
Even better would be to create a tempdir and populate it during the test run. Try the tempfile crate.
-
How to open a PDF with default PDF viewer?
Not the same commenter but you could use a tempfile
-
Blog post: Async Cancellation
That said though; there are a few solutions for the problem you're describing. One would be to have a "temp file" type which knows how to delete itself when dropped, but can manually be converted into a permanent file in the case of success. Crates like tempfile provide abstractions for this.
-
temp-dir: Simple temporary directory with cleanup
tempdir was merged into tempfile.
tectonic
-
I rewrote my CV in Typst and I'll never look back
You may want to try https://github.com/tectonic-typesetting/tectonic, which downloads files from TeXLive on-demand.
-
bard 2.0
v2 has improved TeX engine lookup, improved PDF template look&feel, proper support for MS Windows (where it comes integrated with the Tectonic engine) and a few more new features.
-
[Media] Version 0.3 of Inlyne - An interactive markdown renderer written entirely in Rust
There's https://github.com/tectonic-typesetting/tectonic but I think the issue with that idea is that sure, you can re-implement TeX (it's sufficiently simple) in Rust and then run LaTeX packages on top of it, but then you're back to LaTeX and all its weirdness so you haven't really gained anything compared to LaTeX itself.
-
Arch for science
In terms of TeX, I would recommend taking a look at tectonic, a self-contained TeX distribution that auto-installs packages you need when you need them, and “just works” when you call the binary to compile… Because screw messing around with package managers, CTAN and XeTeX. I’ve been using it for around a year and it’s so much easier than any other TeX distribution.
-
Porting Python reportlab code to Rust
For example, you can have your main application in something like Deno/Node/python that acts as a server, and then delegate the actual pdf generation to tectonic (https://github.com/tectonic-typesetting/tectonic) or Typst https://typst.app/blog/2023/beta-oss-launch/
-
Another rewrite in rust: Pydantic
tectonic: https://github.com/tectonic-typesetting/tectonic
- \begin{mess}
-
UnTeX - Parsing and formatting TeX documents with Rust - Looking for help
How does it compare with Tectonic?
-
Brian Kernighan adds Unicode support to Awk (May, 2022)
It's sad that Tectonic conversion to Rust[1] was never finished. For now it's just a wrapper around C and C++ code. By far, it was the most promising thing in this distribution.
[1] https://github.com/tectonic-typesetting/tectonic/issues/459
-
LaTex alternative/replacement written in Rust?
The only thing I've seen is https://github.com/tectonic-typesetting/tectonic but that's an actual re-implementation of TeX Rust.
What are some alternatives?
tempdir - Temporary directory management for Rust
miktex - the MiKTeX source code
zbox - Zero-details, privacy-focused in-app file system.
texlab - An implementation of the Language Server Protocol for LaTeX
xattr - Extended attribute library for rust.
tex-rs - A port of TeX82 to Rust. (WIP)
rust-9p - Tokio-based asynchronous filesystems library using 9P2000.L protocol, an extended variant of 9P from Plan 9.
Oberon - Oberon parser, code model & browser, compiler and IDE with debugger
rust - Empowering everyone to build reliable and efficient software.
arara
fs_extra - Expanding opportunities standard library std::fs and std::io
rpm-ostree - ⚛📦 Hybrid image/package system with atomic upgrades and package layering