v0.3 is a complete architectural rewrite using modern tooling: - * replaces Node.js/npm - for type-safe business logic - *WASM (Rust) for performance-critical code - ** as glue layer
Your data remains 100% compatible.
Before (v0.2):
npm install
node src/cli.js reportAfter (v0.3):
# No installation needed!
task report
# Or use just (recommended)
just reportBefore (v0.2):
import { createMapper } from './src/index.js';
After (v0.3):
import { createMapper } from './src/index.ts'; // .ts extension
Before (v0.2): - package.json with npm dependencies - node_modules folder - Zod for validation
After (v0.3): - .json with JSR imports - No node_modules - WASM for validation (10-100x faster) - for business logic
-
** (required)
curl -fsSL https://deno.land/install.sh | sh-
Rust (for WASM compilation)
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
rustup target add wasm32-unknown-unknown-
** (for business logic compilation)
npm install -g # One-time global install-
just (optional but recommended)
cargo install justBefore (v0.2): Zod runtime validation (~1ms per experience) After (v0.3): WASM validation (~0.01ms per experience)
100x faster validation
Before (v0.2): JavaScript (~50ms for 1000 experiences) After (v0.3): WASM (~5ms for 1000 experiences)
10x faster network generation
just compile
./bin/ubicity report # Standalone binary!No runtime needed for deployment.
provides compile-time type checking:
// This won't compile if types don't match let experience = LearningExperience.make( ~learner=invalidLearner, // Compile error! ~context=context, ~experience=exp, () )
// Immutable data, pure functions let interdisciplinary = experiences ->Analysis.findInterdisciplinary ->Array.map(formatForDisplay) ->Array.filter(meetsThreshold)
#
curl -fsSL https://deno.land/install.sh | sh
# Rust (for WASM)
curl https://sh.rustup.rs -sSf | sh
rustup target add wasm32-unknown-unknown
#
npm install -g
# just (optional)
cargo install just# Your data is still in ./ubicity-data/
just stats # Should show your existing experiences✅ 100% Compatible
All v0.2 experience files work in v0.3 without modification.
The JSON schema is identical. Only the runtime changed.
Install :
curl -fsSL https://deno.land/install.sh | sh
# Add to PATH
echo 'export PATH="$HOME/./bin:$PATH"' >> ~/.bashrc
source ~/.bashrcIf v0.3 doesn’t work for you, v0.2 code is still available:
git checkout tags/v0.2.0
npm install
npm testYour data works with both versions.
┌─────────────────────────────────────────────┐ │ Runtime () │ │ ┌──────────────┐ ┌──────────────┐ │ │ │ CLI/API │◄──────►│ Storage │ │ │ └──────┬───────┘ └──────────────┘ │ │ │ │ │ ▼ │ │ ┌─────────────────────────────────┐ │ │ │ Glue Layer │ │ │ └────┬──────────────────┬──────────┘ │ │ │ │ │ │ ▼ ▼ │ │ ┌──────────┐ ┌──────────┐ │ │ │ │ │ WASM │ │ │ │ Business │ │ Performance│ │ │ │ Logic │ │ Critical │ │ │ └──────────┘ └──────────┘ │ └─────────────────────────────────────────────┘
*: Type-safe business logic (functional) *WASM (Rust): Validation, analysis, computations **: Glue layer, I/O, CLI
-
src-/UbiCity.res- Functional business logic -
wasm/src/lib.rs- Performance-critical Rust -
src/storage.ts- file I/O -
src/*-bridge.ts- Integration glue
Q: Why over Node.js? A: Built-in , secure by default, modern tooling, no node_modules.
Q: Why over ? A: Stronger type system, better optimization, functional programming, OCaml heritage.
Q: Why WASM? A: 10-100x faster than JavaScript for computation-heavy tasks.
Q: Can I still use v0.2? A: Yes, it’s still maintained. But v0.3 is recommended.
Q: Do I need to rebuild WASM every time? A: No, only when you modify
wasm/src/lib.rs.
Q: What if I don’t have Rust installed? A: Pre-compiled WASM binaries will be provided in releases.
Issues: https://github.com/Hyperpolymath/ubicity/issues Discussions: https://github.com/Hyperpolymath/ubicity/discussions
Ready to migrate?
just setup
just build
just test
just reportWelcome to UbiCity v0.3! 🚀