You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix 4 verified skill content bugs from issue #1 (#2)
- Add [package] + [lib] crate-type=["cdylib"] to 6 Rust Cargo.toml examples
- Fix II Rust backend: StableCell for OWNER instead of thread_local! heap
- Fix SNS token math: governance 5.2M → 5M to match 10M total
- Standardize ic-stable-structures to 0.7 across all skills
Co-authored-by: Josh <josh@Joshs-MacBook-Pro.local>
Copy file name to clipboardExpand all lines: public/llms-full.txt
+63-9Lines changed: 63 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -2559,6 +2559,14 @@ persistent actor {
2559
2559
2560
2560
```toml
2561
2561
# Cargo.toml
2562
+
[package]
2563
+
name = "https_outcalls_backend"
2564
+
version = "0.1.0"
2565
+
edition = "2021"
2566
+
2567
+
[lib]
2568
+
crate-type = ["cdylib"]
2569
+
2562
2570
[dependencies]
2563
2571
ic-cdk = "0.18"
2564
2572
candid = "0.10"
@@ -3055,6 +3063,14 @@ persistent actor {
3055
3063
#### Cargo.toml Dependencies
3056
3064
3057
3065
```toml
3066
+
[package]
3067
+
name = "icrc_ledger_backend"
3068
+
version = "0.1.0"
3069
+
edition = "2021"
3070
+
3071
+
[lib]
3072
+
crate-type = ["cdylib"]
3073
+
3058
3074
[dependencies]
3059
3075
ic-cdk = "0.18"
3060
3076
candid = "0.10"
@@ -3387,6 +3403,8 @@ Internet Identity (II) is the Internet Computer's native authentication system.
3387
3403
3388
3404
7. **Not calling `agent.fetchRootKey()` in local development.** Without this, certificate verification fails on localhost. Never call it in production -- it's a security risk on mainnet.
3389
3405
3406
+
8. **Storing auth state in `thread_local!` without stable storage (Rust)** -- `thread_local! { RefCell<T> }` is heap memory, wiped on every canister upgrade. Use `StableCell` from `ic-stable-structures` for any state that must persist across upgrades, especially ownership/auth data.
3407
+
3390
3408
## Implementation
3391
3409
3392
3410
### icp.json Configuration
@@ -3566,19 +3584,31 @@ persistent actor {
3566
3584
3567
3585
```toml
3568
3586
# Cargo.toml
3587
+
[package]
3588
+
name = "ii_backend"
3589
+
version = "0.1.0"
3590
+
edition = "2021"
3591
+
3592
+
[lib]
3593
+
crate-type = ["cdylib"]
3594
+
3569
3595
[dependencies]
3570
3596
ic-cdk = "0.18"
3571
3597
candid = "0.10"
3572
3598
serde = { version = "1", features = ["derive"] }
3599
+
ic-stable-structures = "0.7"
3573
3600
```
3574
3601
3575
3602
```rust
3576
3603
use candid::Principal;
3577
3604
use ic_cdk::{caller, query, update};
3605
+
use ic_stable_structures::{DefaultMemoryImpl, StableCell};
Copy file name to clipboardExpand all lines: skills/internet-identity/SKILL.md
+20-6Lines changed: 20 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -48,6 +48,8 @@ Internet Identity (II) is the Internet Computer's native authentication system.
48
48
49
49
7.**Not calling `agent.fetchRootKey()` in local development.** Without this, certificate verification fails on localhost. Never call it in production -- it's a security risk on mainnet.
50
50
51
+
8.**Storing auth state in `thread_local!` without stable storage (Rust)** -- `thread_local! { RefCell<T> }` is heap memory, wiped on every canister upgrade. Use `StableCell` from `ic-stable-structures` for any state that must persist across upgrades, especially ownership/auth data.
52
+
51
53
## Implementation
52
54
53
55
### icp.json Configuration
@@ -227,19 +229,31 @@ persistent actor {
227
229
228
230
```toml
229
231
# Cargo.toml
232
+
[package]
233
+
name ="ii_backend"
234
+
version ="0.1.0"
235
+
edition ="2021"
236
+
237
+
[lib]
238
+
crate-type = ["cdylib"]
239
+
230
240
[dependencies]
231
241
ic-cdk ="0.18"
232
242
candid ="0.10"
233
243
serde = { version ="1", features = ["derive"] }
244
+
ic-stable-structures ="0.7"
234
245
```
235
246
236
247
```rust
237
248
use candid::Principal;
238
249
use ic_cdk::{caller, query, update};
250
+
use ic_stable_structures::{DefaultMemoryImpl, StableCell};
0 commit comments