Skip to content

Instantly share code, notes, and snippets.


Johan Andersson repi

View GitHub Profile
repi /
Last active March 7, 2023 00:55
Guidelines on evaluating health & quality of third-party crates at Embark

note: I wrote this for our internal documentation & guidelines at Embark so not all of it is likely relevant for other companies, but sharing here as others expressed interest in seeing it

What to evaluate and consider before adding usage of new third-party crates.

These are not exact requirements but questions to investigate and discuss to help reason around the health, safety, maintainability, and more around crates.

This can also be read as an opinionated guide for crate authors of what our (Embark's) guidelines and recommendations are, though should not be taken too literally.

repi /
Last active September 14, 2021 07:39
File system & path handling in Ark

note: this is taken straight from our internal crate documentation, so missing some references here, but thought may be of interest for a few others of how we chosen to approach file system and paths in our codebase.

File system & path handling in Ark

We use capability-based security through [cap-std::fs] to only give sub-systems access within pre-opened directories instead of arbitrary system paths to keep file system access highly structured and isolated.

We use exclusively use UTF-8 encoded paths as they are significantly easier to use and manage compared to the non-UTF-8 platform-dependent std::path types.

This crate replaces [std::fs], std::path and [tokio::fs], and the intention is to use this approach and types for handling files & paths across the codebase.

repi / Clippy.toml
Last active October 14, 2021 02:44
Embark Clippy.toml for `disallowed_method` lint
View Clippy.toml
msrv = "1.55.0"
# for `disallowed_method`:
disallowed-methods = [
# std functions
"std::env::temp_dir", # we use the tempdir crate instead through ark_file_system::TempDir
"std::env::home_dir", # deprecated, and we use app_dirs2 crate
"std::env::set_current_dir", # don't change the current working directory, it usually leads to shared sadness
"std::env::var_os", # use std::env::var and UTF-8 strings instead, including for paths
"std::env::env_os", # use std::env::env and UTF-8 strings instead, including for paths
repi / Cargo.toml
Created November 10, 2018 05:19
Sync Rust crates for offline usage & docs
View Cargo.toml
name = "depdl"
version = "0.1.0"
# add whatever crates you want to be able to use offline here
futures = "*"
meowhash = "*"

Keybase proof

I hereby claim:

  • I am repi on github.
  • I am repi ( on keybase.
  • I have a public key ASAY_TtFz30iF8buvljWG4EaJ3Mnod7Wu2w1ckUSjR40Fgo

To claim this, I am signing this object: