mirror of
https://github.com/MeiK2333/river.git
synced 2025-11-04 14:49:40 +08:00
Update
This commit is contained in:
parent
a2f016a66c
commit
405e2dbd56
6
.dockerignore
Normal file
6
.dockerignore
Normal file
@ -0,0 +1,6 @@
|
||||
example
|
||||
node_modules
|
||||
.git
|
||||
target
|
||||
nohup
|
||||
README.md
|
||||
@ -1,12 +1,12 @@
|
||||
FROM rust:latest as builder
|
||||
|
||||
RUN rustup component add rustfmt --toolchain 1.47.0-x86_64-unknown-linux-gnu
|
||||
|
||||
COPY . /river
|
||||
|
||||
WORKDIR /river
|
||||
|
||||
RUN rustup component add rustfmt --toolchain 1.47.0-x86_64-unknown-linux-gnu && \
|
||||
cargo build --release
|
||||
|
||||
RUN cargo build --release
|
||||
|
||||
FROM ubuntu:18.04
|
||||
|
||||
|
||||
@ -25,3 +25,4 @@ python3 main.py
|
||||
- docker 部署
|
||||
- 更多语言支持
|
||||
- 使用配置文件配置语言
|
||||
- 使用环境变量等机制自定义评测目录
|
||||
|
||||
@ -5,8 +5,7 @@ echo "Hello World!"
|
||||
mkdir -p /river/runner
|
||||
# 运行的上层目录创建 node_modules,以便 Node 与 TypeScript 使用
|
||||
cd /river/runner
|
||||
npm init -y
|
||||
npm i @types/node
|
||||
npm i
|
||||
|
||||
cd /plugins/js
|
||||
npm install
|
||||
|
||||
3
runner/.gitignore
vendored
3
runner/.gitignore
vendored
@ -2,3 +2,6 @@
|
||||
*
|
||||
# Except this file
|
||||
!.gitignore
|
||||
!package.json
|
||||
!tsconfig.json
|
||||
|
||||
|
||||
15
runner/package.json
Normal file
15
runner/package.json
Normal file
@ -0,0 +1,15 @@
|
||||
{
|
||||
"name": "river",
|
||||
"version": "1.0.0",
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"keywords": [],
|
||||
"author": "",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"@types/node": "^14.14.6"
|
||||
}
|
||||
}
|
||||
15
runner/tsconfig.json
Normal file
15
runner/tsconfig.json
Normal file
@ -0,0 +1,15 @@
|
||||
{
|
||||
"compileOnSave": true,
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"target": "ESNext",
|
||||
"skipLibCheck": true,
|
||||
"strict": false,
|
||||
"resolveJsonModule": true,
|
||||
"esModuleInterop": true,
|
||||
"noErrorTruncation": true,
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"emitDecoratorMetadata": true,
|
||||
"experimentalDecorators": true,
|
||||
}
|
||||
}
|
||||
@ -63,6 +63,7 @@ pub async fn judger(
|
||||
if request.language == Language::Java as i32
|
||||
|| request.language == Language::Go as i32
|
||||
|| request.language == Language::Node as i32
|
||||
|| request.language == Language::TypeScript as i32
|
||||
{
|
||||
runner.memory_limit = -1;
|
||||
runner.traceme = false;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user