mirror of
https://github.com/MeiK2333/river.git
synced 2025-11-04 14:49:40 +08:00
添加语言版本号字段
This commit is contained in:
parent
e14068cff4
commit
14bb325f0d
@ -5,38 +5,49 @@ languages:
|
||||
compile_cmd: /usr/bin/gcc main.c -o a.out -Wall -O2 -std=c99 --static
|
||||
code_file: main.c
|
||||
run_cmd: ./a.out
|
||||
version: gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0
|
||||
|
||||
Cpp:
|
||||
compile_cmd: /usr/bin/g++ main.cpp -O2 -Wall --static -o a.out --std=gnu++17
|
||||
code_file: main.cpp
|
||||
run_cmd: ./a.out
|
||||
version: g++ (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0
|
||||
|
||||
Python:
|
||||
compile_cmd: /usr/bin/python3.8 -m compileall main.py
|
||||
code_file: main.py
|
||||
run_cmd: /usr/bin/python3.8 main.py
|
||||
version: Python 3.8.5
|
||||
|
||||
Rust:
|
||||
compile_cmd: /root/.cargo/bin/rustc main.rs -o a.out -C opt-level=2
|
||||
code_file: main.rs
|
||||
run_cmd: ./a.out
|
||||
version: rustc 1.49.0 (e1884a8e3 2020-12-29)
|
||||
|
||||
Node:
|
||||
compile_cmd: /usr/bin/node /plugins/node/validate.js main.js
|
||||
code_file: main.js
|
||||
run_cmd: /usr/bin/node main.js
|
||||
version: v14.15.4
|
||||
|
||||
TypeScript:
|
||||
compile_cmd: /usr/bin/tsc -p /tsconfig.json
|
||||
code_file: main.ts
|
||||
run_cmd: /usr/bin/node main.js
|
||||
version: v9.1.1
|
||||
|
||||
Go:
|
||||
compile_cmd: /usr/bin/go build -o a.out main.go
|
||||
code_file: main.go
|
||||
run_cmd: ./a.out
|
||||
version: go version go1.15.6 linux/amd64
|
||||
|
||||
Java:
|
||||
compile_cmd: /usr/bin/javac Main.java
|
||||
code_file: Main.java
|
||||
run_cmd: /usr/bin/java -cp . Main
|
||||
version: |-
|
||||
openjdk 11.0.9.1 2020-11-04
|
||||
OpenJDK Runtime Environment (build 11.0.9.1+1-Ubuntu-0ubuntu1.20.04)
|
||||
OpenJDK 64-Bit Server VM (build 11.0.9.1+1-Ubuntu-0ubuntu1.20.04, mixed mode, sharing)
|
||||
|
||||
@ -13,6 +13,7 @@ message LanguageItem {
|
||||
string language = 1;
|
||||
string compile = 2;
|
||||
string run = 3;
|
||||
string version = 4;
|
||||
}
|
||||
|
||||
message LanguageConfigResponse {
|
||||
|
||||
@ -21,6 +21,7 @@ pub struct LanguageConf {
|
||||
pub compile_cmd: String,
|
||||
pub code_file: String,
|
||||
pub run_cmd: String,
|
||||
pub version: String,
|
||||
}
|
||||
|
||||
#[derive(Debug, PartialEq, Serialize, Deserialize)]
|
||||
|
||||
@ -116,6 +116,7 @@ impl River for RiverService {
|
||||
language: String::from(key),
|
||||
compile: String::from(&value.compile_cmd),
|
||||
run: String::from(&value.run_cmd),
|
||||
version: String::from(&value.version),
|
||||
});
|
||||
}
|
||||
let response = LanguageConfigResponse {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user