coursier
はScalaやJavaのパッケージやツール(例:sbt、scala、scala-cli、jvm など)を素早くインストール・管理できるツール。
# On Linux x86-64 (aka AMD64)
coursier
はScalaやJavaのパッケージやツール(例:sbt、scala、scala-cli、jvm など)を素早くインストール・管理できるツール。
# On Linux x86-64 (aka AMD64)
#!/usr/bin/env bash | |
set -e | |
INSTALL_DIR="$HOME/.dotnet" | |
VERSION_PREFIX="" | |
RUNTIMES=() | |
DRY_RUN=false | |
AUTO_YES=false | |
LIST_MODE=false |
[package] | |
name = "rustyfeed" | |
version = "0.1.0" | |
edition = "2024" | |
[dependencies] | |
clap = { version = "4.5.32", features = ["derive"] } | |
reqwest = "0.12.15" | |
serde = { version = "1.0.219", features = ["derive"] } | |
syndication = "0.5.0" |
# About: | |
# Dockerfile for SML# a Standard ML family programming language | |
# See: | |
# https://github.com/smlsharp/smlsharp | |
# Usage: | |
# docker build -t smlsharp . | |
# docker run --rm -it smlsharp:latest rlwrap smlsharp | |
# | |
FROM --platform=linux/x86-64 debian:buster |
mod cli { | |
use std::io::Write; | |
#[derive(Debug, thiserror::Error)] | |
pub enum CliError { | |
#[error("failed to flush stdout: {0}")] | |
Flush(std::io::Error), | |
#[error("failed read line: {0}")] | |
ReadLine(std::io::Error), |
/// A module for emitting [`Event`] defined in this module by internally looping events and handling crossterm events | |
use crossterm::event::{Event as CrosstermEvent, EventStream as CrosstermEventStream}; | |
use pin_project::pin_project; | |
use std::time::Duration; | |
use tokio::sync::mpsc; | |
use tokio_stream::{Stream, StreamExt}; | |
#[derive(Debug, Clone, Copy)] | |
pub enum Event { | |
Tick, |
String
:
A growable, heap-allocated string type. It's the most common string type used in Rust and is often used when you need to modify the string's contents.
&str
:
A string slice, which is a reference to a portion of a string, usually a part of a String
or a string literal. It is an immutable reference to a sequence of UTF-8 encoded bytes.
use clap::{Parser, ValueEnum}; | |
use glob::{glob, GlobError, PatternError}; | |
use std::path::PathBuf; | |
use thiserror::Error; | |
#[derive(Debug, clap::Parser)] | |
struct Args { | |
#[arg(help = "Target files path")] | |
files: Vec<String>, |
package main | |
import ( | |
"progressbar_example/progress" | |
"time" | |
) | |
func main() { | |
count := 10000 |
use eyre::{Result, WrapErr}; | |
use tokio::io::{AsyncBufReadExt, AsyncWriteExt, BufWriter}; | |
use tokio::process::Command; // Use eyre for error handling | |
pub async fn run_command<W: tokio::io::AsyncWrite + Send + 'static + Unpin>( | |
cmd: &str, | |
args: &[&str], | |
stdout_writer: W, | |
stderr_writer: W, | |
) -> Result<()> { |