Skip to content

Commit

Permalink
base-impl
Browse files Browse the repository at this point in the history
  • Loading branch information
Sunrisepeak committed Jan 3, 2025
1 parent 966a7b2 commit 63db97d
Show file tree
Hide file tree
Showing 15 changed files with 504 additions and 33 deletions.
2 changes: 2 additions & 0 deletions core/xvm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,5 @@ path = "src/main.rs"
serde = { version = "1.0", features = ["derive"] }
serde_yaml = "0.8"
indexmap = { version = "1.9", features = ["serde"] }
clap = { version = "4.3", features = ["derive"] } # 用于解析命令行参数
anyhow = "1.0"
13 changes: 13 additions & 0 deletions core/xvm/config/cmd.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
xvm add target version --path xxx
xvm add target version --filename xxx
xvm add target version --env name=value
xvm remove target version

xvm use target version
xvm current target
xvm run target version --command xxx
xvm list target

xvm workspace target
xvm workspace target --enable
xvm workspace target --disable
16 changes: 15 additions & 1 deletion core/xvm/config/config.xvm.yaml
Original file line number Diff line number Diff line change
@@ -1 +1,15 @@
bindir: xxx
bindir: xxx

xvm add target version --path xxx
xvm add target version --filename xxx
xvm add target version --env name=value
xvm remove target version

xvm use target version
xvm current target
xvm run target version --args xxx
xvm list target

xvm workspace target
xvm workspace target --enable
xvm workspace target --disable
8 changes: 6 additions & 2 deletions core/xvm/config/versions.xvm.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
---
python:
3.12.3:
filename: python3
path: /usr/bin
2.7.18:
path: /usr/bin
3.12.1:
path: /usr/bin
java:
8.0.0:
path: /usr/local/java/8
Expand All @@ -25,3 +24,8 @@ test2:
path: /usr/bin
3.12.2:
path: /usr/bin
mytest:
3.12.1:
path: /home/speak/workspace/github/d2learn/xlings/core/xvm
3.12.2:
path: /home/speak/workspace/github/d2learn/xlings/core/xvm
5 changes: 3 additions & 2 deletions core/xvm/config/workspace.xvm.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
---
xvm-wmetadata:
name: demo
name: global
active: true
versions:
python: 2.7.18
python: 3.12.3
java: 8.0.0
node: 21.7.3
mytest: 3.12.2
1 change: 1 addition & 0 deletions core/xvm/mytest
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
xvm run mytest $@
4 changes: 4 additions & 0 deletions core/xvm/src/baseinfo.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
//use std::env;

pub static BINDIR: &str = "/home/speak/workspace/github/d2learn/xlings/core/xvm";
//static RUNDIR: &str = env::current_dir().unwrap().to_str().unwrap();
Loading

0 comments on commit 63db97d

Please sign in to comment.