We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 62f5765 commit 953f3afCopy full SHA for 953f3af
CONTRIBUTING.md
@@ -37,13 +37,17 @@ cargo test
37
```
38
39
## Building and testing with Docker
40
+
41
Build the binary in Docker and copy it to the current directory (this can be useful to create a binary linked with an older glibc):
42
43
```bash
44
export DOCKER_BUILDKIT=1
45
docker build . -f docker/Dockerfile -t tmc-langs-rust
-docker run --rm -v $PWD:/build/out tmc-langs-rust bash -c "cargo build && cp /build/target/debug/tmc-langs-cli /build/out/"
46
+docker run --rm -v "$PWD":/build/out tmc-langs-rust bash -c "cargo build && cp /build/target/debug/tmc-langs-cli /build/out/"
47
48
49
Run tests in Docker:
50
51
52
53
Cargo.lock
Cargo.toml
@@ -15,6 +15,7 @@ members = [
15
resolver = "2"
16
17
[workspace.package]
18
+version = "0.27.0"
19
authors = [
20
"University of Helsinki <mooc@cs.helsinki.fi>",
21
"Daniel Martinez <daniel.x.martinez@helsinki.fi>",
crates/bindings/tmc-langs-node/Cargo.toml
@@ -1,6 +1,6 @@
1
[package]
2
name = "tmc-langs-node"
3
-version = "0.1.0"
+version.workspace = true
4
authors.workspace = true
5
edition.workspace = true
6
description = "Bindings to the tmc-langs library for Node"
crates/bindings/tmc-langs-node/src/helpers.rs
@@ -99,6 +99,20 @@ macro_rules! parse_args {
99
parse_arg!($cx, $ty8, 8),
100
);
101
};
102
+ ($cx: ident, $id0: ident : $ty0: path, $id1: ident : $ty1: path, $id2: ident : $ty2: path, $id3: ident : $ty3: path, $id4: ident : $ty4: path, $id5: ident : $ty5: path, $id6: ident : $ty6: path, $id7: ident : $ty7: path, $id8: ident : $ty8: path, $id9: ident : $ty9: path) => {
103
+ let ($id0, $id1, $id2, $id3, $id4, $id5, $id6, $id7, $id8, $id9) = (
104
+ parse_arg!($cx, $ty0, 0),
105
+ parse_arg!($cx, $ty1, 1),
106
+ parse_arg!($cx, $ty2, 2),
107
+ parse_arg!($cx, $ty3, 3),
108
+ parse_arg!($cx, $ty4, 4),
109
+ parse_arg!($cx, $ty5, 5),
110
+ parse_arg!($cx, $ty6, 6),
111
+ parse_arg!($cx, $ty7, 7),
112
+ parse_arg!($cx, $ty8, 8),
113
+ parse_arg!($cx, $ty9, 9),
114
+ );
115
+ };
116
}
117
118
pub fn convert_err<E: Error>(cx: &mut FunctionContext, e: E) -> Throw {
crates/bindings/tmc-langs-node/src/lib.rs
@@ -14,7 +14,8 @@ use std::{
14
use thiserror::Error;
use tmc_langs::{
file_util, ClientError, Compression, Credentials, DownloadOrUpdateCourseExercisesResult,
- FeedbackAnswer, LangsError, Language, NewSubmission, SubmissionFinished, TmcClient, TmcConfig,
+ FeedbackAnswer, LangsError, Language, NewSubmission, PrepareSubmission, SubmissionFinished,
+ TmcClient, TmcConfig,
#[derive(Debug, Error)]
@@ -185,6 +186,7 @@ fn prepare_submission(mut cx: FunctionContext) -> JsResult<JsValue> {
185
186
stub_compression: Compression,
187
submission_path: PathBuf,
188
submission_compression: Compression,
189
+ extract_submission_naively: bool,
190
tmc_param: Vec<(String, Vec<String>)>,
191
top_level_dir_name: Option<String>
192
@@ -210,7 +212,11 @@ fn prepare_submission(mut cx: FunctionContext) -> JsResult<JsValue> {
210
212
211
213
214
let res = tmc_langs::prepare_submission(
- (&submission_path, submission_compression),
215
+ PrepareSubmission {
216
+ archive: &submission_path,
217
+ compression: submission_compression,
218
+ extract_naively: extract_submission_naively,
219
+ },
220
&output_path,
221
top_level_dir_name,
222
tmc_params,
crates/helpers/tmc-server-mock/Cargo.toml
name = "tmc-server-mock"
license.workspace = true
crates/plugins/csharp/Cargo.toml
name = "tmc-langs-csharp"
crates/plugins/java/Cargo.toml
name = "tmc-langs-java"
crates/plugins/make/Cargo.toml
name = "tmc-langs-make"
0 commit comments