The OpState in async is in Rc<RefCell<OpState>>
With latest deno_core version 0.331.0:
#[op2(async)]
pub async fn op_return_value(
state: Rc<RefCell<OpState>>,
#[string] value: String,
) -> Result<(), deno_error::JsErrorBox> {
let state = state.borrow();
// Use the state
Ok(())
}