Skip to content

Commit

Permalink
publish to npm
Browse files Browse the repository at this point in the history
  • Loading branch information
oovm committed Dec 22, 2024
1 parent fff85ee commit d3bae66
Show file tree
Hide file tree
Showing 43 changed files with 109 additions and 2,696 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,6 @@ target/
Cargo.lock

# Node
node_modules/
node_modules/
legion-wasm32-wasi.wasm
package-lock.json
17 changes: 17 additions & 0 deletions .run/build wasi target.run.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="build wasi target" type="CargoCommandRunConfiguration" factoryName="Cargo Command">
<option name="command" value="component build --release --target wasm32-wasip2" />
<option name="workingDirectory" value="file://$PROJECT_DIR$" />
<envs />
<option name="emulateTerminal" value="true" />
<option name="channel" value="DEFAULT" />
<option name="requiredFeatures" value="true" />
<option name="allFeatures" value="false" />
<option name="withSudo" value="false" />
<option name="buildTarget" value="REMOTE" />
<option name="backtrace" value="SHORT" />
<option name="isRedirectInput" value="false" />
<option name="redirectInputPath" value="" />
<method v="2" />
</configuration>
</component>
18 changes: 18 additions & 0 deletions .run/copy to npm.run.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="copy to npm" type="CargoCommandRunConfiguration" factoryName="Cargo Command">
<option name="buildProfileId" value="test" />
<option name="command" value="test --package legion --lib cli_cmds::cmd_decode::tests::decode2 -- --exact" />
<option name="workingDirectory" value="file://$PROJECT_DIR$" />
<envs />
<option name="emulateTerminal" value="true" />
<option name="channel" value="DEFAULT" />
<option name="requiredFeatures" value="true" />
<option name="allFeatures" value="false" />
<option name="withSudo" value="false" />
<option name="buildTarget" value="REMOTE" />
<option name="backtrace" value="SHORT" />
<option name="isRedirectInput" value="false" />
<option name="redirectInputPath" value="" />
<method v="2" />
</configuration>
</component>
3 changes: 3 additions & 0 deletions .run/test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
cargo component build --release --target wasm32-wasip2
cp target/wasm32-wasip2/release/legion_wit.wasm projects/legion-wasm32-wasi/legion-wasm32-wasi.wasm
jco transpile projects/legion-wasm32-wasi/legion-wasm32-wasi.wasm -o projects/legion-wasm32-wasi/src --name index
3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@ resolver = "2"
members = ["projects/*"]
default-members = [
"projects/legion-app",
# "projects/legion-config",
"projects/legion-wit",
]
exclude = [
"projects/.DS_Store",
"projects/legion-wasm32-wasi"
]

[profile.release]
Expand Down
8 changes: 8 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,19 @@
{
"private": true,
"workspaces": [
"projects/*"
],
"scripts": {
"build": "cargo build --release",
"test": "cargo test --release",
"fmt": "cargo fmt --all",
"p": "git push && git push --tags --prune",
"reset": "git reset Head~ --soft",
"u": "cargo upgrade --workspace"
},
"devDependencies": {
"@bytecodealliance/jco": "^1.8.1",
"@types/node": "^22",
"typescript": "^5.7.2"
}
}
18 changes: 0 additions & 18 deletions projects/legion-app/add/Cargo.toml

This file was deleted.

3 changes: 0 additions & 3 deletions projects/legion-app/add/src/main.rs

This file was deleted.

13 changes: 0 additions & 13 deletions projects/legion-app/src/cli_cmds/cmd_add/mod.rs

This file was deleted.

Empty file.
Binary file not shown.
82 changes: 0 additions & 82 deletions projects/legion-app/src/cli_cmds/cmd_decode/decode_component.wat

This file was deleted.

Binary file not shown.
Binary file not shown.

This file was deleted.

Loading

0 comments on commit d3bae66

Please sign in to comment.