Skip to content

Commit 201f0f0

Browse files
committed
Initial Rust integration
1 parent 2b2d5f8 commit 201f0f0

43 files changed

Lines changed: 3423 additions & 47 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

eslint.config.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,6 @@ const angularTsRuntimeCompatibilityRules = {
9797
"@typescript-eslint/no-unnecessary-condition": "off",
9898
"@typescript-eslint/no-unsafe-argument": "off",
9999
"@typescript-eslint/no-unsafe-assignment": "off",
100-
"@typescript-eslint/no-unsafe-function-type": "off",
101100
"@typescript-eslint/prefer-nullish-coalescing": "off",
102101
"@typescript-eslint/restrict-plus-operands": "off",
103102
"@typescript-eslint/restrict-template-expressions": "off",

integrations/rust/.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
/target/
2+
/pkg/
3+
/dist/
4+
/.angular-ts/
5+
/examples/basic_app/.angular-ts/
6+
/examples/basic_app/pkg/

integrations/rust/Cargo.lock

Lines changed: 230 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

integrations/rust/Cargo.toml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
[workspace]
2+
members = [
3+
"crates/angular-ts",
4+
"crates/angular-ts-build",
5+
"crates/angular-ts-macros",
6+
"examples/basic_app",
7+
]
8+
resolver = "2"
9+
10+
[workspace.package]
11+
edition = "2021"
12+
license = "MIT"
13+
repository = "https://github.com/angular-wave/angular.ts"
14+
rust-version = "1.77"

integrations/rust/Makefile

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
.PHONY: all check test parity build-tool example-check example-build wasm-check browser-test clean
2+
3+
CARGO ?= cargo
4+
NODE ?= node
5+
PLAYWRIGHT ?= ../../node_modules/.bin/playwright
6+
7+
all: check
8+
9+
check: parity
10+
$(CARGO) check --workspace
11+
12+
test: parity
13+
$(CARGO) test --workspace
14+
15+
parity:
16+
$(NODE) tool/check-ng-namespace-parity.mjs
17+
18+
build-tool:
19+
$(CARGO) run -p angular-ts-build -- build --manifest examples/basic_app/angular-ts.json --out examples/basic_app/.angular-ts/bootstrap.js
20+
21+
example-check:
22+
$(CARGO) check -p angular-ts-rust-basic-app
23+
24+
wasm-check:
25+
$(CARGO) check -p angular-ts-rust-basic-app --target wasm32-unknown-unknown
26+
27+
example-build: wasm-check
28+
$(CARGO) build -p angular-ts-rust-basic-app --target wasm32-unknown-unknown
29+
wasm-bindgen target/wasm32-unknown-unknown/debug/angular_ts_rust_basic_app.wasm --target web --out-dir examples/basic_app/pkg
30+
$(MAKE) build-tool
31+
32+
browser-test: example-build
33+
$(PLAYWRIGHT) test --config playwright.config.ts
34+
35+
clean:
36+
$(CARGO) clean
37+
rm -rf .angular-ts pkg dist examples/basic_app/.angular-ts examples/basic_app/pkg

0 commit comments

Comments
 (0)