• Rust 85%
  • JavaScript 15%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-06-30 06:57:48 +02:00
examples chore: initialize 2026-06-30 06:57:48 +02:00
scripts chore: initialize 2026-06-30 06:57:48 +02:00
src chore: initialize 2026-06-30 06:57:48 +02:00
.gitignore chore: initialize 2026-06-30 06:57:48 +02:00
Cargo.lock chore: initialize 2026-06-30 06:57:48 +02:00
Cargo.toml chore: initialize 2026-06-30 06:57:48 +02:00
LICENSE.md chore: initialize 2026-06-30 06:57:48 +02:00
README.md chore: initialize 2026-06-30 06:57:48 +02:00

@unilim/biome

Biome profile bindings for Unilim, compiled from Rust to WebAssembly.

Install

npm install @unilim/biome @unilim/cas

A Biome session is opened from a CAS session: @unilim/biome receives a CAS object from @unilim/cas across the JS boundary, so install both.

Usage

import { CAS } from "@unilim/cas";
import { Biome } from "@unilim/biome";

// any CAS session (restore / initialize+2FA / temporary)
const cas = await CAS.restore(username, password, connection, key);

const biome = await Biome.fromCAS(cas);
console.log(biome.username, biome.roles);
console.log(await biome.profile());

How the CAS object is shared

Biome.fromCAS(cas) takes the live CAS object, not a cookie string. This crate depends on unilim-cas and sources the CAS type from it:

  • wasmunilim_cas::boundary (extern declarations of @unilim/cas's CAS/OAuth2); biome calls the object's methods across the JS boundary and links no CAS client.
  • nativeunilim_cas::client::Cas (the real Rust client); from_cas takes a &Cas and calls its methods directly, so it works off-wasm too.