1diff --git a/src/lib.rs b/src/lib.rs
2index 42126dd..f37ed52 100644
3--- a/src/lib.rs
4+++ b/src/lib.rs
5@@ -247,6 +247,10 @@
6 #[rustfmt::skip]
7 mod tables;
8
9+/// Use std to allow building as a dylib.
10+#[cfg(android_dylib)]
11+extern crate std;
12+
13 use crate::tables::{ASCII_CONTINUE, ASCII_START, CHUNK, LEAF, TRIE_CONTINUE, TRIE_START};
14
15 pub fn is_xid_start(ch: char) -> bool {
16